• Resolved joy0114

    (@joy0114)


    Hi,

    I’d like to apply an additional class to the “submit” buttons, whether on the cart page or the checkout page, or emails.

    So in my child theme, I started by copying the templates as follows:

    /my-child-theme/pw-woocommerce-gift-cards/templates/woocommerce/cart/all-the-cart-templates

    And similarly for /checkout/all-the-checkout-templates, /emails/all-the-amails-templates, /single-product/all-the-single-product-templates

    Unfortunately, the desired class isn’t applied to the submit button. So I’m assuming these custom templates aren’t being loaded.

    What am I missing when it comes to plugin templates and their priority ?

    Thanks for your advice.

    Best regards

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Brad – Pimwick, LLC

    (@bradpimwick)

    Hi,

    The custom templates aren’t loading because of the folder path. This plugin uses WooCommerce’s template system, so overrides go in your theme’s woocommerce folder, not under the plugin slug.

    One other thing: this plugin only outputs the gift card fields (Apply Gift Card, Redeem, etc.). It does not control WooCommerce’s main cart/checkout buttons (Update cart, Proceed to checkout, Place order) or standard WooCommerce emails. Those come from WooCommerce (or your theme). To change those, override the WooCommerce templates instead.

    Let me know if there is anything else I can help with.

    Thread Starter joy0114

    (@joy0114)

    Hi Brad,

    Thanks for your clarification about custom template path.

    So I used the existing /my-child-theme/woocommerce/cart/ directory (and /my-child-theme/woocommerce/checkout/ .. and so on).

    But I noticed that /my-child-theme/woocommerce/cart/apply-gift-card.php is ignored. For this template, this is /plugins/pw-woocommerce-gift-cards/templates/woocommerce/cart/apply-gift-card.php which is used.

    For checkout, it seems custom template (payment-method-pw-gift-card.php) in child theme is effectively used.

    I can’t seem to figure out why this is happening: I can get a custom template to work for checkout, but not for the shopping cart !

Viewing 2 replies - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.