Product Page Widget


  1. Within your OpenCart Dashboard, navigate to your Theme Editor via Design
  1. Select product then product.twig


  1. Within the product.twig file, locate the section of the file where the price is displayed (CTRL+F "price")
  1. Paste the following script in your product.twig under the price section:
<script src="{{product.selected_or_first_available_variant.price | divided_by:100.00}}&merchantId=YOUR_MERCHANT_ID"></script>



Replace YOUR_MERCHANT_ID with your humm Merchant ID

{% if price %}
  <ul class="list-unstyled">
    {% if not special %}
      <h2>{{ price }}</h2>
    {% else %}
    <li><span style="text-decoration: line-through;">{{ price }}</span></li>
      <h2>{{ special }}</h2>
    {% endif %}
    {% if tax %}
    <li>{{ text_tax }} {{ tax }}</li>
    {% endif %}
    {% if points %}
    <li>{{ text_points }} {{ points }}</li>
    {% endif %}
    {% if discounts %}
    {% for discount in discounts %}
    <li>{{ discount.quantity }}{{ text_discount }}{{ discount.price }}</li>
    {% endfor %}
    {% endif %}
{% endif %}

Above is an example of default theme where you would insert the widget (INSERT_WIDGET_HERE line). Themes do differ, though.

  1. Press Save to confirm the widget is applied.
  2. Preview your site to see your widget on your site.


Need help?

If you require any help or have any questions, please reach out to us via the Integration Assistance Form