Using Trusted Shops with Zen Cart

Show Trustbadge, integrate Buyer Protection & collect shop reviews

The unique Trustbadge® technology makes it so simple to collect, manage and display your customer reviews in your shop. You can also easily integrate your trustmark and offer the Buyer Protection.

To display the Trustbadge in your shop, you will need your personal Trustbadge code. First you need to generate your code on this website. Enter your Trusted Shops ID (starting with X...) in the input field provided. The code will then be generated.

You can find your Trusted Shops ID in your dashboard in the My Trusted Shops backend. To do this, first log in to My Trusted Shops here. After logging in, you will be taken directly to the dashboard. In the right column of the dashboard, your shops which are registered with Trusted Shops are listed, with their respective Trusted Shops ID.

Copy the complete code into the clipboard.

TBCode2.png

In order for the Trustbadge to be displayed in your shop, you have to adapt the PHP file tpl_footer.php Search for them under the following file path:

…/includes/templates/responsive_classic/common/tpl_footer.php

tpl_Footer.png

Open the file and paste the previously generated Trustbadge code from your clipboard at the end of the existing code.

TBCode.png

Then save the file.

In order to offer your customers the Buyer Protection at the end of their order, the file tpl_checkout_success_default.php must also be adapted. This file can be found under the following file path:

…includes/templates/template_default/templates/tpl_checkout_success_default.php

CheckoutPhp.png

Open the file. At the end of the already existing code you must now insert one of the following two codes. Which code is the right one for you depends on your Zen cart version. If you are using Zen-Cart version 1.5 or higher, please use the following code:

<!-- bof Trusted Shops -->

<?php $sql = "select customers_email_address from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$_SESSION['customer_id'] . "'";

$result = $db->Execute($sql);

$customers_email_address = $result->fields['customers_email_address']; ?>

<div id="trustedShopsCheckout" style="display: none;">

    <span id="tsCheckoutOrderNr"><?php echo $order_summary['order_number'];?></span>

    <span id="tsCheckoutBuyerEmail"><?php echo $result->fields['customers_email_address'];?></span>

    <span id="tsCheckoutOrderAmount"><?php echo $order_summary['order_total'];?></span>

    <span id="tsCheckoutOrderPaymentType"><?php echo $order_summary['payment_module_code'];?></span>

    <span id="tsCheckoutOrderCurrency">EUR</span>

</div>

<!-- eof Trusted Shops -->

If your Zen Cart version is lower than 1.5, please use the following code:

<!-- bof Trusted Shops -->

<div id="trustedShopsCheckout" style="display: none;">

<span id="tsCheckoutOrderNr">' . $ord['orders_id'] .'</span>

<span id="tsCheckoutBuyerEmail">' . $ord['customers_email_address'] .'</span>

<span id="tsCheckoutOrderAmount">' . $ord['order_total'] .'</span>

<span id="tsCheckoutOrderCurrency">EUR</span>

<span id="tsCheckoutOrderPaymentType">' . $payment_type . '</span>

<span id="tsCheckoutOrderEstDeliveryDate"></span>

</div>

<!-- eof Trusted Shops -->

If your shop uses a currency other than the Euro, you will have to adapt the code slightly. This applies to both code versions. Simply replace the currency abbreviation EUR with the abbreviation of the currency used by your shop within the code line <span id="tsCheckoutOrderCurrency">EUR</span>.

CheckOutCode.png

Save your adjustments afterwards.

Once you have completed these steps, you can now test the function of your Trustbadge. To do this, place a test order in your shop. When the Trustcard (“Buyer Protection Card") appears at the end of your order, you have integrated the Trustbadge into your shop and the Buyer Protection is active. 

website_integration_custom_en-GB.png


Was this article helpful?

0 out of 0 found this helpful