Which file is used for product listing?

  • Posts: 22
  • Thank you received: 0
5 years 6 months ago #298736

I'm not a php jockey, but I'll see how far I can get. Which php file creates the layout for product listing?

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

  • Posts: 81515
  • Thank you received: 13069
  • MODERATOR
5 years 6 months ago #298738

Hi,

There are many involved based on which part of the listing you want to edit and how you configured your menu item.
The best is to activate the "display view files" setting of the HikaShop configuration. That will display the view and file names of each view file being used on their top left corner. Then, you can just edit the corresponding view file via the menu Display>Views.

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

  • Posts: 22
  • Thank you received: 0
5 years 6 months ago #298743

As I said, I'm not a php jockey. This is what I want to achieve on the products listing page. I've create that page with a default install.
Menu > Product listing.

Once I know which file(s) is involved, I can create an override for it. Most of what I want is fairly simple: change the position of the product title and the price. That's easy enough to do.

What I want to add is an extra field with intro text and an extra button that shows a demo url. (This is for selling software) That means also a modification to the product template. I found that one, but not the Products Listing.

Where or what is it, and if you have any suggestion, I'll ears!

It's probably too difficult for me to makes those modifications. Is there a forum where I can ask a developer?

Attachments:
Last edit: 5 years 6 months ago by josflachs.

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

  • Posts: 81515
  • Thank you received: 13069
  • MODERATOR
5 years 6 months ago #298746

Hi,

That shouldn't be too difficult.
You'll want to edit the file "listing_img_title" of the view "product" via the menu Display>Views. There, you can move around the different blocks and add additional PHP code based on what you want to display.
If you want to add an extra field to store the short description of the product, you can create a custom field of the table "product" via the menu Display>Custom fields (Essential or Business edition required).
Then, in your view file override, you can simply add such code:
<?php echo $this->row->XXX; ?>
where XXX is the column name of your custom field, and you'll get displayed the text you entered in that custom field in each product.

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

Time to create page: 0.045 seconds
Powered by Kunena Forum