Add prices to Store page detail variant.
- 0.2.0
-
7.1
- Not Applicable
-
Install Store Page Price Change. After you install the code be sure to continue on with the rest of the steps.
-
Options
-
Page Specific
Use this option when you want only one Page to have this effect.
- Add code from file store page detail price variant add.html to Store Settings > Advanced > Page Header Code Injection for the Store Page. Refer to Per-page code injection for details.
-
Site-wide
Use this option when you want multiple Pages to have this effect.
- Add code from file store page detail price variant add.html to Website > Pages > Custom Code > Code Injection > FOOTER. Refer to Add code to code injection for details.
-
-
Read the code for any instructions within.
-
Add the following to searchReplaceText in the Store Page price change code per that codes instructions.
// store page detail price variant add "[enter search text here between single quotes replacing square brackets]" : "twcSpdpva",The search text you enter needs to target the end of the price. For prices that end with a currency symbol, it is easy. For example if the currency is Euros then you enter € for search text. If the price ends with numbers then things get a bit trickier. You need to use a regular expression. For example /(\\d+(?:,\\d{3})*)(\\.\\d{2})?/.
This code only works for one variant.
Please consider making a donation.
-
2024-10-05
- rework code to use JavaScript Module Patterns for twc, twc.sppc, and twc.sppc.callbacks
- bumped version to 0.2.0
-
2022-10-02
- initial version