Add IDs to the order totals in the completion page

  • Impression eStudio
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
4 years 1 month ago #139352 by Impression eStudio
Add IDs to the order totals in the completion page was created by Impression eStudio
Hi,

(This is a very simple improvement.)

The completion page of a purchase shows the order totals (e.g. total price before tax, shipping price, total price after tax etc.)
It would be could to mark all these prices with an ID in the HTML code in order to be able to handle them.

This is good for at least two reasons:
1. We can add custom javascript code that gets these prices using their IDs. There are a lot of tracking scripts (e.g. for reviews, affiliates, user satisfaction) that demand feedback with these values.
2. Facebook Event Manager supports a visual tool with which the user can click to specific areas on a page in order Facebook to get automatically values like prices. This tool helps to define easier the Facebook Pixel events, so no code is required. This would be good for all these marketing specialists.

In order the above to happen, the only change that is required, is to go to the file "components/com_eshop/themes/default/views/checkout/complete.php" and change the line with code:
Code:
<?php echo $ordertotal->text?>
to
Code:
<span id="<?php echo $ordertotal->name; ?>"><?php echo $ordertotal->text?></span>

Possibly there is a better idea than what I suggest.

Thanks

Please Log in or Create an account to join the conversation.

Moderators: Giang Dinh Truong