by
KK » Tue Nov 17, 2015 9:29 pm
Hi Tony

Displaying the gross price instead of the price difference is purely a front-end matter and wouldn't require any mod to do so.
As also explained in the docs (
http://docs.couchcms.com/concepts/shopp ... g-products), the <cms:pp_option_values> can be instructed not to automatically generate any markup and then we can use our own HTML to show the variants in any manner desired.
Taking the example of the sample code used in the docs, following is the manner we are displaying the variants -
- Code: Select all
<cms:pp_product_options >
<label><cms:show option_name />:</label><br>
<cms:pp_option_values /><br>
</cms:pp_product_options >
The <cms:pp_option_values /> above is self-closing and this makes it output the default markup for the variants.
Since that markup does not suit us, we can configure the tag to allow us to take over and use our own HTML for display.
Following is the code that you use in place of the code above to output the gross price -
- Code: Select all
<cms:pp_product_options >
<cms:if option_type='list'>
<cms:if option_modifier='*' || option_modifier='**'>
<label><cms:show option_name />:</label><br>
<input type="hidden" name="on<cms:show k_count />" value="<cms:show option_name />" style="display:none;">
<cms:set radio_input_name="os<cms:show k_count />" />
<cms:pp_option_values>
<label class="radio-label">
<input type="radio" name="<cms:show radio_input_name />" value="<cms:show k_count />"<cms:if k_count='0'> checked="true"</cms:if>>
<cms:show option_val />
<cms:if option_price >
<cms:set my_price="<cms:if option_price_sign='+'><cms:add pp_price option_price /><cms:else/><cms:sub pp_price option_price /></cms:if>" />
[<cms:pp_config 'currency_symbol' /><cms:number_format my_price />]
<cms:else />
[<cms:pp_config 'currency_symbol' /><cms:number_format pp_price />]
</cms:if>
</label>
<cms:if option_modifier='*'><br/></cms:if>
</cms:pp_option_values>
<cms:else />
<label><cms:show option_name />:</label><br>
<input type="hidden" name="on<cms:show k_count />" value="<cms:show option_name />" style="display:none;">
<select name="os<cms:show k_count />">
<cms:pp_option_values>
<option value="<cms:show k_count />">
<cms:show option_val />
<cms:if option_price >
<cms:set my_price="<cms:if option_price_sign='+'><cms:add pp_price option_price /><cms:else/><cms:sub pp_price option_price /></cms:if>" />
[<cms:pp_config 'currency_symbol' /><cms:number_format my_price />]
<cms:else />
[<cms:pp_config 'currency_symbol' /><cms:number_format pp_price />]
</cms:if>
</option>
</cms:pp_option_values>
</select>
</cms:if>
<cms:else />
<label><cms:show option_name />:</label><br>:
<input type="hidden" name="on<cms:show k_count />" value="<cms:show option_name />" style="display:none;">
<input type="text" name="os<cms:show k_count />" maxlength="200">
</cms:if>
</cms:pp_product_options>
Using the custom code above, suppose the variants setting for the item was as follows -
- Code: Select all
Size[Large | Medium=+1.2 | Small=-2]*
The original display:

- a.png (3.95 KiB) Viewed 2152 times
- now becomes:

- b.png (4.01 KiB) Viewed 2152 times
Incidentally, that also takes care of the missing trailing zero you mentioned.
Hope it helps.