Trusted Shops integration
- CMS-Buttler
-
Topic Author
- Offline
-- Joomla version -- : 3.3.6
-- PHP version -- : 5.4.30
-- Browser(s) name and version -- : Firefox 35
Hello support Team,
i need to know the values used by hikashop for the bold written values.
Maybe you could be of assistence.
<div id="trustedShopsCheckout" style="display: none;">
<span id="tsCheckoutOrderNr">%Value: ORDER_NUMBER%</span>
<span id="tsCheckoutBuyerEmail">%Value: BUYER_EMAIL_ADDRESS%</span>
<span id="tsCheckoutBuyerId">%Value: CUSTOMER_ID%</span>
<span id="tsCheckoutOrderAmount">%Value: SHOPPING_BASKET_TOTAL%</span>
<span id="tsCheckoutOrderCurrency">%Value: ORDER_CURRENCY%</span>
<span id="tsCheckoutOrderPaymentType">%Value: PAYMENT_METHOD%</span>
</div>
<span id="tsCheckoutBuyerEmail"><?php echo $customer_email; ?></span>
Thx
Andreas
Please Log in or Create an account to join the conversation.
I don't know what you are talking about.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
- CMS-Buttler
-
Topic Author
- Offline
ORDER_NUMBER
BUYER_EMAIL_ADDRESS
CUSTOMER_ID
SHOPPING_BASKET_TOTAL
ORDER_CURRENCY
PAYMENT_METHOD
customer_email
these are examples from Trusted Shops for a widget. I need to put the field names used by hikashop in it to work correctly
thx
Andreas
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
- CMS-Buttler
-
Topic Author
- Offline
Please Log in or Create an account to join the conversation.
Thanks Korzo
@CMS-Butter : Sorry, I still don't understand ; I don't know what is this widget and what you want to achieve.
The values you are asking for could be retrieve but only on some specific conditions so I don't think that's you really want to know.
So, please ; provide some explanations and some details... A lot of details !
Because for the moment I can't give you any answer ; it does not have any sense for me.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
- CMS-Buttler
-
Topic Author
- Offline
Please Log in or Create an account to join the conversation.
You could add such code:
Please Log in or Create an account to join the conversation.
- CMS-Buttler
-
Topic Author
- Offline
thx
what about a own Joomla article?
is it possible too?
Please Log in or Create an account to join the conversation.
- CMS-Buttler
-
Topic Author
- Offline
nicolas wrote: Hi,
You could add such code:Either in the "after_end" or the "end" view file (depending on the payment method you're using) of the "checkout" view via the menu Display>ViewsCode:<?php $app = JFactory::getApplication(): $id = $app->getUserState('com_hikashop.order_id'); $orderClass = hikashop_get('class.order'); $order = $orderClass->loadFullOrder($id,true,false); ?> <div id="trustedShopsCheckout" style="display: none;"> <span id="tsCheckoutOrderNr"><?php echo $order->order_number; ?></span> <span id="tsCheckoutBuyerEmail"><?php echo $order->customer->user_email; ?></span> <span id="tsCheckoutBuyerId"><?php echo $order->customer->user_id; ?></span> <span id="tsCheckoutOrderAmount"><?php echo $order->order_full_price; ?></span> <span id="tsCheckoutOrderCurrency">EUR</span> <span id="tsCheckoutOrderPaymentType"><?php echo $order->order_payment_method; ?></span> </div>
Hello nicolas this does not work.
Just getting a white page.
Please Log in or Create an account to join the conversation.
If you are able to add php code inside an article, so yes you can use that code.
It get the id of the order in the user session, so it can be used anywhere.
The white page means that you have a php error, so please set the Joomla error reporting level to "maximum" to see the details of the error.
Please Log in or Create an account to join the conversation.
I am using trustedbadge on my hika shop website. I want to be able to collect reviews from shoppers after they make a purchase. Here is a link from Trusted Shops on how to do this:
www.trustedshops.co.uk/support/trustbadge/#step1
As CMS Butler wrote we need to get the correct values for these fields from hikashop in order for this to work. Can you tell me if hikashop uses these field names or what are the correct ones. See below:
Insert a DIV element onto the Order Confirmation (Thank you) page of your shop. This element will ensure the rate later card is initiated, asking your customers to leave a review after their purchase.
In order to ease the review process for your customers, we recommend you pre-fill the required order data in the integration code. This way your customers will not have to fill in the form by themselves.
Before you start you should check our list of shopsoftware specific step-by-step guides you find here for your shopsoftware. Those guides are more specific and get you up and running fast.
<div id="trustedShopsCheckout" style="display: none;">
<span id="tsCheckoutOrderNr">%Value: ORDER_NUMBER%</span>
<span id="tsCheckoutBuyerEmail">%Value: BUYER_EMAIL_ADDRESS%</span>
<span id="tsCheckoutBuyerId">%Value: CUSTOMER_ID%</span>
<span id="tsCheckoutOrderAmount">%Value: SHOPPING_BASKET_TOTAL%</span>
<span id="tsCheckoutOrderCurrency">%Value: ORDER_CURRENCY%</span>
<span id="tsCheckoutOrderPaymentType">%Value: PAYMENT_METHOD%</span>
</div>
The values of the parameters should be filled in using the script language used by your shop system.
For example, in PHP the transfer of the e-mail address could look as follows, where $customer_email corresponds to the internal name given to the customer's e-mail address in your shop system:
<span id="tsCheckoutBuyerEmail"><?php echo $customer_email; ?></span>
The email address and order number is mandatory for the process asking your customers to leave a review after their purchase. We recommend to submit all values in addition.
That’s it! Your Trustbadge® will now start automatically collecting reviews from your customers.
__________________
Thanks, b
Please Log in or Create an account to join the conversation.
Nicolas already provide a working code which can display the wanted content on several specific pages.
www.hikashop.com/forum/orders-management...egration.html#187351
And I insist on the several specific pages ; not all pages and not a lambda page.
Like Nicolas wrote :
Either in the "after_end" or the "end" view file (depending on the payment method you're using) of the "checkout" view via the menu Display>Views
So, please follow the indications and if you have any trouble with the code, please check your PHP error log or activate the Joomla debug mode in your Joomla global configuration in order to have more details about your issue.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
On the code Nicolas put up on this post he has:
<span id="tsCheckoutOrderCurrency">EUR</span>
But on my shop we have multi currency, what code should replace Euro to capture the currency used?
thanks,
Please Log in or Create an account to join the conversation.
- Posts: 12953
- Thank you received: 1778
A solution can be to use the hikashop_getCurrency() function which will give you the ID of the current currency used, then you'll just have to use that kind of SQL request to have more information about that currency :
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
- Posts: 2
- Thank you received: 1
Please Log in or Create an account to join the conversation.