Jump to content

Trusted Shops Buyer Protection


fantastichearts

Recommended Posts

Hi,

 

I need to add the Trusted shop buyer protection to my content.receipt.php file.

 

 http://www.trustedshops.com/tsdocument/_INT_MANUAL_CLASSIC_en.pdf (see page 7 for more details)

 

The suggested HTML code is and I need to replace is as follows but I am not sure how to code the elements I need to replace in red e.g {value email}

 

 

<table width=400 border="0" cellspacing="0" cellpadding="4"> 
<tr> 
<td width="90"> 
<a 
target="_blank"><img border="0" 
Shops Seal of Approval - Click to verify." alt="Trusted Shops Seal of 
Approval - click to verify."></a> 
</td> 
<td align="justify"> 
<form id="formTShops" name="formTShops" method="post" 
target="_blank"> 
<input name="_charset_" type="hidden" value=""> 
<input name="shop_id" type="hidden" value="{value shop_id}"> ( I have my shop id) I presume I just add it here
<input name="email" type="hidden" value="{value email}"> 
<input name="amount" type="hidden" value="{value amount}"> 
<input name="curr" type="hidden" value="{value curr}"> 
<input name="paymentType" type="hidden" value="{value paymentType}"> 
<input name="kdnr" type="hidden" value="{value kdnr}"> (from manual says not compulsary)
<input name="ordernr" type="hidden" value="{value ordernr}"> 
We offer you the Trusted Shops Buyer Protection as an additional service. We 
cover all costs for this guarantee. All you have to do is register! 
<br><br> 
<input type="submit" id="btnProtect" name="btnProtect" value="Register for 
Trusted Shops Buyer Protection"> 
</form> 
</td> 
</tr> 
</table>
 
Tanks for any help.
Link to comment
Share on other sites

When putting other {placeholders} in a template file, see if there are already {placeholders} that match what you want.

 

For example, in content.receipt.php, there is already {$SUM.cart_order_id} that can be used for <input name="ordernr" type="hidden" value="{value ordernr}">.

 

{$SUM.total} for {value amount} (be careful as this value is a string of characters that has the currency symbol applied and the value is the conversion from the store's default currency to the customer's chosen currency)

 

{$SUM.email} for {value email}

 

{$SUM.gateway} for {value payment type} (the "name" of the gateway used, although perhaps they specifically mean Visa, MC, Disc, or etc??)

 

Currency code is going to be difficult as that is not saved anywhere. But if you can guarantee that the customer must buy in the store's default currency, you can use {$CONFIG.default_currency}

Link to comment
Share on other sites

Thanks for this.

 

The only issue seems to be the total as it is passing 0.

 

I presume it is to do with what you said below. Can you see any work around this?

 

When putting other {placeholders} in a template file, see if there are already {placeholders} that match what you want.

 

For example, in content.receipt.php, there is already {$SUM.cart_order_id} that can be used for <input name="ordernr" type="hidden" value="{value ordernr}">. THIS WORKS

 

{$SUM.total} for {value amount} (be careful as this value is a string of characters that has the currency symbol applied and the value is the conversion from the store's default currency to the customer's chosen currency). DID NOT WORK

 

{$SUM.email} for {value email} THIS WORKS

 

{$SUM.gateway} for {value payment type} (the "name" of the gateway used, although perhaps they specifically mean Visa, MC, Disc, or etc??) OK NOT GOING TO USE AS DO NOT NEED

 

Currency code is going to be difficult as that is not saved anywhere. But if you can guarantee that the customer must buy in the store's default currency, you can use {$CONFIG.default_currency} ADDING DIRECTLY GBP as will only be one currency.

Link to comment
Share on other sites

From where are you getting confirmation that certain values worked and certain values did not work?

 

The code should not be passing out zero. You can check by asking your browser to "show source". From that, you verify the values in the hidden input fields. If the value for the Grand Total {$SUM.total} is actually expressed as a string with symbol (£6,383.50), then the recipient of the form data may be the entity that is not able to handle it.

 

If that is the case, we would have to modify the controller code that populates this template to include a raw number in the dataset given to the template.

Link to comment
Share on other sites

Thank you to bsmither who sorted this out.

 

The issue as {$SUM.total} adds the £ symbol. Therefore to strip this out you use the suggestion below.

 

 

Where you have {$SUM.total}, use this:

{$SUM.total|regex_replace:"/[^0-9.]/":""}

This should strip out anything not a number or period.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...