We use the built in WooCommerce template system. To override the look of the Apply Gift Card area, copy the template file to your theme directory. The template files are here:
/wp-content/plugins/pw-woocommerce-gift-cards/templates/woocommerce/
When you find the template file you want to override, copy it to your theme directory:
/wp-content/themes/<your_theme>/woocommerce/
Note: make sure that you copy any subdirectories as well!
Once the file is in your theme folder, open them up in a text editor and make any changes to the HTML and CSS.
There are four template files for the “Apply Gift Card” area depending on the settings chosen here:
Pimwick Plugins -> PW Gift Cards -> Settings -> Redeem Location
For the “Cart” page:
/pw-woocommerce-gift-cards/templates/woocommerce/cart/apply-gift-card-after-cart-contents.php
/pw-woocommerce-gift-cards/templates/woocommerce/cart/apply-gift-card.php
For the “Checkout” page:
/pw-woocommerce-gift-cards/templates/woocommerce/checkout/coupon-area-pw-gift-card.php
/pw-woocommerce-gift-cards/templates/woocommerce/checkout/payment-method-pw-gift-card.php
Hope that helps, let me know if you have any questions!
-
This reply was modified 6 years, 9 months ago by
pimwick.
Hi
Than you very much for your answer
However I follow all the step but I don’t see where I can modify the CSS or the HTML of these file.
I find only the 4 PHP files (2 Choices for the cart page and 2 choices for the checkout page) as you mentionned but I don’t see where I can change the text of the label
🙁
Since you originally inquired about the Checkout page, I will focus on just those two templates. If you need to update the Cart page as well just let me know.
coupon-area-pw-gift-card.php
The “Have a gift card?” text is on line 8.
payment-method-pw-gift-card.php
The “Have a gift card?” text is on line 9.
Alternatively, instead of copying the template files to your Themes folder and editing them, you can use something such as the free Loco Translate plugin to edit the text.
That works with loco translate! Thanks you
I forget to reply, I did it in the theme, your first reply helps me to find the good folder.
Thanks you