Displaying Product Weight on front end

  • Posts: 88
  • Thank you received: 0
13 years 2 months ago #25725

Hi,

Apologies if this has been asked already.

I have a requirement to display the product weight and some customised product fields in a front end module and also on the product pages - see attached. Do I need to edit one of the view files? If so, which one?

Thanks in advance

Darren

Attachments:

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

  • Posts: 82868
  • Thank you received: 13377
  • MODERATOR
13 years 2 months ago #25730

Hi,

Yes you will need to edit view files via the menu Display->Views.
For that products listing page, you will need to edit the file "listing_img_title" of the view "product". Adding such information is quite easy as it is already loaded from the database:
echo $this->row->product_weight;
echo $this->row->CUSTOM_FIELD_COLUMN_NAME;

For the product page, it's the file "show" of the view "product" with the variable $this->element instead of $this->row.

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

  • Posts: 88
  • Thank you received: 0
13 years 2 months ago #25733

Brilliant, thanks Nicholas.

On another matter - how do I upgrade to the Business edition without loosing any of the CSS, products or customisation?

Thanks

Darren

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

  • Posts: 82868
  • Thank you received: 13377
  • MODERATOR
13 years 2 months ago #25734

If you do your modifications via the interface, you won't loose anything as the view files and CSS modifications are stored as overrides and are not updated (only the core file is updated). Products information is of course not affected by updates.

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

Time to create page: 0.062 seconds
Powered by Kunena Forum