Show Payment Surcharge Next To Payment Method Options

Hi, Even though the forum seems completely dead to v2x CsCart users these days, we are still finding quirky little things that just are not right and need fixing,



When coustomers get o Step 3 to select the paymet method at checkout, the Payment Surcharge does not show.



Looking at the code for v2.1.4, the Payment method surcharge % and flat rate are not coded to show on Step 3 "3. Payment and Shipping " block of the Checkout page.



I would like this to show, as we want our customers to know BEFORE they select a payment method.



We do have a my_changes /hooks/payment_methods.override.tpl, but even the standard cart function does not show it.



What code do I need to add to the payment_methods.override.tpl file to show the Surcharge structure next to the {$pm.description} ?



I tried {$pm.surcharge} , but hat isnt it.



Thanks,

2014-05-16 14_32_08-Mobile Broadband Antennas.png

[quote name='remoteone' timestamp='1400216572' post='183638']

Hi, Even though the forum seems completely dead to v2x CsCart users these days, we are still finding quirky little things that just are not right and need fixing,



When coustomers get o Step 3 to select the paymet method at checkout, the Payment Surcharge does not show.



Looking at the code for v2.1.4, the Payment method surcharge % and flat rate are not coded to show on Step 3 "3. Payment and Shipping " block of the Checkout page.



I would like this to show, as we want our customers to know BEFORE they select a payment method.



We do have a my_changes /hooks/payment_methods.override.tpl, but even the standard cart function does not show it.



What code do I need to add to the payment_methods.override.tpl file to show the Surcharge structure next to the {$pm.description} ?



I tried {$pm.surcharge} , but hat isnt it.



Thanks,

[/quote]



Please use the following code:



{include file="common_templates/price.tpl" value=$pm.surcharge_value}




Thanks.

Hello, Thanks very much for the code, however, that's not exactly what I meant.



What I'm wanting is for the Surcharge [% and Fixed] settings for the particular Payment Method to show on Step 3 "3. Payment and Shipping " block of the Checkout page.



Fo if the PayPal method is setup to apply a +2% + $0.00 surcharge, then the Checkout page will show say

“(Payment Surcharge +2%)”



Or if the surcharge is +2% + $0.30 , then the Checkout page will show say

“(Payment Surcharge +2% plus $0.30)”



Rather than the actual surcharge amount.

This is pretty much the way most other webstores present it.



Like this mockup:





Thanks again.

[quote name='remoteone' timestamp='1400508781' post='183803']

Hello, Thanks very much for the code, however, that's not exactly what I meant.



What I'm wanting is for the Surcharge [% and Fixed] settings for the particular Payment Method to show on Step 3 "3. Payment and Shipping " block of the Checkout page.



Fo if the PayPal method is setup to apply a +2% + $0.00 surcharge, then the Checkout page will show say

“(Payment Surcharge +2%)”



Or if the surcharge is +2% + $0.30 , then the Checkout page will show say

“(Payment Surcharge +2% plus $0.30)”



Rather than the actual surcharge amount.

This is pretty much the way most other webstores present it.



Like this mockup:





Thanks again.

[/quote]



In this cause please use the following values for the fixed and % surcharge values:


{$pm.a_surcharge}

{$pm.p_surcharge}



Thanks

Actually,

Ive worked out a better way to present this to the customer.

Recalculating the Percentage Surcharge based on the surcharge_value / Cart_total, gives an actual Payment surcharge for this order as a percentage, so the fixed value part does not show separately, but is instead included in the % displayed.

Ive also added a $lang.payment_discount variable as we are actually offering a discount for direct bank deposit payments rather than hitting the customer with a surcharge.

Ah-ha!, great, thanks for the very fast response. I might use those after all. Cheers.



So, I came up with 2 alternate codes:

To recalculate the Payment Surcharge/Discount as a % of the total so it just shows as a %:

{$pm.description}
{if $pm.surcharge_value != 0 && $cart.total != 0}

{math equation="x / y * 100" x=$pm.surcharge_value y=$cart.total assign="surcharge_as_percent"}
({if $pm.surcharge_value < 0}{$lang.payment_discount}: {elseif $pm.surcharge_value > 0}{$lang.payment_surcharge}: {/if}{$surcharge_as_percent|round:"2"}%)
{/if}




To display the % and Fixed Payment Methos Surcharge:


{$pm.description}
{if $pm.a_surcharge != 0 || $pm.p_surcharge != 0}

({if $pm.surcharge_value < 0}{$lang.payment_discount}: {elseif $pm.surcharge_value > 0}{$lang.payment_surcharge}: {/if}{if $pm.p_surcharge != 0}{$pm.p_surcharge|round:"2"}%{/if}{if $pm.a_surcharge != 0}{if $pm.a_surcharge > 0}+{/if}{$pm.a_surcharge|number_format:2}{/if})
{/if}

Again, thanks for your help, greatly appreciated.

[quote name='remoteone' timestamp='1400518312' post='183819']

Again, thanks for your help, greatly appreciated.

[/quote]



You are welcome! We are glad to hear that the problem is solved.