Customziation of price information

  • Posts: 30
  • Thank you received: 3
  • Hikashop Business
2 days 12 hours ago #366640

-- HikaShop version -- : 5.1.5
-- Joomla version -- : 5.2.6
-- PHP version -- : 8.4.5
-- Browser(s) name and version -- : Chrome 135.0.7049.85

Hi!

1st:
I create an online shop for a german local retailer. In germany all extended price information has to be displayed on every location the price is shown - such as the category product listings. Here I face some problems. How to display the whole price information area from the product page in the category product listing (-> attached screenshot)?

I have to display all these information at the place where the price is display in the category product listing.

2nd:
How to customize the product page? I know there are some templates or "views" in the configuration. But for the view "product" there are 50 (!) of them. How to know which to use if I want to change something? Is there any documentation?

In my case I have to change the order of the "price per weight" / "price weight" information.

Attachments:

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

  • Posts: 83599
  • Thank you received: 13532
  • MODERATOR
2 days 8 hours ago #366646

Hi,

1. The same view file is already used to display the price area on both the product page and the listing of products.
However, if you want to add the price per unit weight to the listings too, you need to change the line:

if(!empty($this->element->product_id) && isset($this->row->product_weight) && bccomp(sprintf('%F',$this->row->product_weight), 0, 3)) {
to:
if(isset($this->row->product_weight) && bccomp(sprintf('%F',$this->row->product_weight), 0, 3)) {
in the product / listing_price view file.

2. Here, we explain how to edit views and how to find which one to edit:
www.hikashop.com/support/documentation/1...-display.html#layout

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

  • Posts: 30
  • Thank you received: 3
  • Hikashop Business
2 days 7 hours ago #366651

nicolas wrote: However, if you want to add the price per unit weight to the listings too, you need to change the line:

if(!empty($this->element->product_id) && isset($this->row->product_weight) && bccomp(sprintf('%F',$this->row->product_weight), 0, 3)) {
to:
if(isset($this->row->product_weight) && bccomp(sprintf('%F',$this->row->product_weight), 0, 3)) {
in the product / listing_price view file.


Hm ... doesn't work. No display of weight or weight per unit. Nothing changed.

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

  • Posts: 83599
  • Thank you received: 13532
  • MODERATOR
1 day 18 hours ago #366654

Hi,

Did you edit the view file for the template you're using on your frontend ?
If you're editing it for another template, then it won't change anything.

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

  • Posts: 30
  • Thank you received: 3
  • Hikashop Business
1 day 16 hours ago #366662

nicolas wrote: Did you edit the view file for the template you're using on your frontend ?
If you're editing it for another template, then it won't change anything.


I think, I'm right. See my screenshot.

Attachments:

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

  • Posts: 83599
  • Thank you received: 13532
  • MODERATOR
1 day 9 hours ago #366675

Hi,

It looks ok.
Can you provide the URL of the products listing page, and a backend access via our contact form so that we can check your modifications and the situation ?
www.hikashop.com/support/contact-us.html

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

  • Posts: 83599
  • Thank you received: 13532
  • MODERATOR
11 hours 8 minutes ago #366707

Hi,

The issue is that you've activated the "Advanced price display" setting of the "price display" tab of your menu item.
That mode doesn't use the same view file as on the product page as it allows you to configure the displayed prices. However, it doesn't have an option to support the price per unit weight for now.
I've deactivated that setting with your backend access and now I can see both the price and the price per unit weight on your products listing, thanks to the view override you made.

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

Time to create page: 0.065 seconds
Powered by Kunena Forum