Month: July 2019

  • How to track qty changes in cart?

    This is not CMS or software specific. Can be used for shopify, magento, wordpress or any other cart page Assumption: All the cart items have an input field for quantity in case they want to change qty for any item Assumption:All those input fields can be selected using queryselector. Either they have common name attribute…

  • How to add qty plus minus buttons in shopify?

    Sorry this is not a detailed description but a summary with all code Add available quantities first – as shown in this article – How to show stock quantities in all variants of shopify ^The above part is utmost necessary. because the following functions use previous js variables. So here we go. Good Luck!! javascript…

  • Sort keys of an array based on order of values in another array – PHP

  • How to filter and validate pincode in Indian woocommerce?

    By default, Woocommerce only validates ZIP code of few countries only. Woocommerce stores in India, are thus invalidated in case of PINCODE inputs from customers. Here is how you can enable checking of pincode for India woocommerce: Put the following code in your custom function file or child theme functions.php Reference: https://github.com/woocommerce/woocommerce/blob/ef0f527b40dba539e982efff26211fa577a24cf9/includes/class-wc-validation.php#L44

  • How to show stock quantity for all variants in shopify?

    How to show “xxx left in stock” on shopify product page? Shopify – show ONLY XX AVAILABLE IN STOCK on product page Start by adding snippet in product-template.liquid Now in theme.js or theme.js.liquid and edit function updateSku / _.updateSku Now add some CSS in custom.css or styles.css Also note, you can add css for the…

  • What is DMARC and How to set it up?

    DMARC stands for Domain-based Message Authentication, Reporting, and Conformance It can be used as a way to prevent specific type of SPAM. Hence it should be added as TXT record in your DNS zone, just like SPF and DKIM signatures. Example DMARC policies These are some example policies and how they appear in the DNS…