Post by AlHassan Arnold » Thu Oct 10, 2024 11:12 pm

Hi there,

We have got an custom extension, that integrates our inventory software with our site, so that it displays pricing depending on what customer group they are set in on the inventory software. However for some reason the products under the "related products" is showing the default price first, when you actually click to see the product, it would display the correct pricing.

We are unsure on how we can just have so that it always displays the correct price (possible limitation to the extension) so we had decided to just take off the pricing from the "related products" entirely. However we are unsure of how to do this, we did try to modify the twig file but it ruined the layout of the related products.

This is the code we tried to modify, this is under the product.twig:

Code: Select all

{% if product.price %}
              <p class="price"> {% if not product.special %}
                {{ product.price }}
                {% else %} <span class="price-new">{{ product.special }}</span> <span class="price-old">{{ product.price }}</span> {% endif %}
                {% if product.tax %} <span class="price-tax">{{ text_tax }} {{ product.tax }}</span> {% endif %} </p>
              {% endif %} </div>
Please let me know your guys' thoughts on this and if you have any suggestions to a resolve.
Last edited by AlHassan Arnold on Tue Oct 15, 2024 5:44 pm, edited 1 time in total.


Posts

Joined
Thu Jul 14, 2022 9:54 pm

Post by johnp » Fri Oct 11, 2024 5:56 am

AlHassan Arnold wrote:
Thu Oct 10, 2024 11:12 pm
Hi there,

We have got an custom extension, that integrates our inventory software with our site, so that it displays pricing depending on what customer group they are set in on the inventory software. However for some reason the products under the "related products" is showing the default price first, when you actually click to see the product, it would display the correct pricing.

We are unsure on how we can just have so that it always displays the correct price (possible limitation to the extension) so we had decided to just take off the pricing from the "related products" entirely. However we are unsure of how to do this, we did try to modify the twig file but it ruined the layout of the related products.

This is the code we tried to modify, this is under the product.twig:

Code: Select all

{% if product.price %}
              <p class="price"> {% if not product.special %}
                {{ product.price }}
                {% else %} <span class="price-new">{{ product.special }}</span> <span class="price-old">{{ product.price }}</span> {% endif %}
                {% if product.tax %} <span class="price-tax">{{ text_tax }} {{ product.tax }}</span> {% endif %} </p>
              {% endif %} </div>
Please let me know your guys' thoughts on this and if you have any suggestions to a resolve.
You could try this.

Code: Select all

{% if product.price %}
<p class="price">&nbsp;</p>
{% endif %}</div>

Opencart 1.5.6.5/OC Bootstrap Pro/VQMOD lover, user and geek.
Affordable Service £££ - Opencart Installs, Fixing, Development and Upgrades
Plus Ecommerce, Marketing, Mailing List Management and More
FREE Guidance and Advice at https://www.ecommerce-help.co.uk


User avatar
Active Member

Posts

Joined
Fri Mar 25, 2011 10:25 am
Location - Surrey, UK

Post by Faizal » Fri Oct 11, 2024 2:54 pm

It turns out this is how it works, okay, thank you :D

1Souvenir: Plakat Akrilik dan Plakat Kayu


User avatar
Newbie

Posts

Joined
Tue Aug 27, 2024 2:44 pm
Location - Indonesia

Post by paulfeakins » Fri Oct 11, 2024 7:22 pm

Faizal wrote:
Fri Oct 11, 2024 2:54 pm
It turns out this is how it works, okay, thank you :D
Shall we consider this [SOLVED]?

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Guru Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by AlHassan Arnold » Tue Oct 15, 2024 5:43 pm

johnp wrote:
Fri Oct 11, 2024 5:56 am
AlHassan Arnold wrote:
Thu Oct 10, 2024 11:12 pm
Hi there,

We have got an custom extension, that integrates our inventory software with our site, so that it displays pricing depending on what customer group they are set in on the inventory software. However for some reason the products under the "related products" is showing the default price first, when you actually click to see the product, it would display the correct pricing.

We are unsure on how we can just have so that it always displays the correct price (possible limitation to the extension) so we had decided to just take off the pricing from the "related products" entirely. However we are unsure of how to do this, we did try to modify the twig file but it ruined the layout of the related products.

This is the code we tried to modify, this is under the product.twig:

Code: Select all

{% if product.price %}
              <p class="price"> {% if not product.special %}
                {{ product.price }}
                {% else %} <span class="price-new">{{ product.special }}</span> <span class="price-old">{{ product.price }}</span> {% endif %}
                {% if product.tax %} <span class="price-tax">{{ text_tax }} {{ product.tax }}</span> {% endif %} </p>
              {% endif %} </div>
Please let me know your guys' thoughts on this and if you have any suggestions to a resolve.
You could try this.

Code: Select all

{% if product.price %}
<p class="price">&nbsp;</p>
{% endif %}</div>
Looks like this it has worked, just replaced the original code with your code and it has worked!

Thank you very much for you assistance, I can safely say this have been solved!


Posts

Joined
Thu Jul 14, 2022 9:54 pm
Who is online

Users browsing this forum: Mariogs, Semrush [Bot] and 14 guests