Shop Doctors
  • English
Go to website
Back
Articles on:Developer Options
Developers/Programmers Options

Categories

  • Dr. Stacked Discounts (FAQ)
  • Dr. FreeGift & BOGO (FAQ)
  • Dr. Cart Shipping Rates (FAQ)
  • Dr. Volume Discounts (FAQ)
  • General Inquiry
  • Developer Options
Dr. Shipping Calculator
  • How do I instruct the app to only show some country/province options in the dropdowns?
    Add the code below to the head section in your theme.liquid file, and add the country codes that correspond to the countries that you'd like to display: Add the code below to the head section in your theme.liquid file, to define the province codes that are allowed for a given country. Only the countries with defined allowed provinces will be filtered. Other countries will still display all available provinces.Few readers
  • How do I configure the app to hide a specific element?
    Add the class docapp-replaces to the element after locating it in the theme files.Few readers
  • Can I test how the app works as seen by customers in a different location?
    Yes, you can using this test utility link to force the app to behave as if the provided IP address is the customer's IP address. Just change "109.71.40.1" to any valid IP address. Keep in mind that if you provide a data center or other non-personal-use IP address, it is very likely that no location will be detected! To clear the IP override use this link:Few readers
Dr. Volume Discounts
  • How do I execute arbitrary JavaScript when the app applies/removes discounts?
    The app exposes an event that you can listen to. Use the data inside the event payload as needed.Few readers
  • Can I configure the app to only activate when the shop uses a certain language?
    Yes, add this code in the theme.layout file. Change the languages in the list as needed.Few readers
  • Can I configure the app to only activate in one of more countries?
    Yes, add this code in the theme.layout file. Change the countries in the list as needed.Few readers
Dr. Discount on Cart
  • How do I execute arbitrary JavaScript when the app applies/removes discounts? (Discounts)
    When the app starts applying/updating/removing a discount: document.body.addEventListener('docapp-discount-applying', (e) = console.log(JSON.stringify(e)); ); When a discount code is entered in the field by a customer: document.body.addEventListener('docapp-discount-code-submit', (e) = console.log(e.code); ); If you want to stop the update process at this time, use thFew readers
  • How do I configure the app to update the subtotal amount to include discounts and/or shipping?
    Add the class docapp-sync-subtotal to the element that contains the subtotal amount. If you'd like the app to also copy over the crossed amount (if that's enabled in the cart summary options), then also add the class docapp-with-crossed.Few readers
  • How do I ask the app to apply a discount code programmatically?
    You may use the call:Few readers
  • How do I ask the app to remove a discount code programmatically?
    By default you would use the method below in order to not only remove the discount code from the app's data and widgets, but also to remove the code that Shopify's Checkout has remembered in its internal data. If you will be calling the "applyCode" method immediately after "removeCode", then you should skip the clearing of Shopify's Checkout discount (to prevent conflicts) and instead use the method below.Few readers
Dr. Free Gift & BOGO
  • Does this app expose any JavaScript events?
    When the app renders progress bar widgets. This allows an easy way to update the rendered HTML at the same time when the progress bar widget is generated. When the app renders popup widget offers. This allows an easy way to update the rendered HTML at the same time when the offers in the popup are generated.Few readers
  • Can I change the location where the variant choice link is injected?
    If you need to specify a custom location for the variant choice link (by default it's under the product image), you can do so by adding this placeholder inside the cart item in your theme.Few readers

Not finding what you are looking for?

Chat with us or send us an email.

  • Chat with us
  • Send us an email
© 2025 Shop Doctors