Adjust article layout in the product overview

  • Posts: 102
  • Thank you received: 12
  • Hikashop Business
2 years 10 months ago #341062

Hello,

where/how to adjust the layout of the product overview?

We want to move the title (product names up = above product image) and add an additional product field with a short product description.

We are currently using img_title.php in the ready-made layouts. But if I move the <!-- NAME --> <!-- EO NAME --> area over the <!-- IMAGE --> <!-- EO IMAGE --> area, for example, nothing changes!

It would be great if I could get a tip on where the problem is. Thanks very much.

Attachments:

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

  • Posts: 4816
  • Thank you received: 654
  • MODERATOR
2 years 10 months ago #341065

Hello,

There are good chance that if you don't see any change, that you didn't edit the good view, take care about one point, views are sorted bt group :
Type groupe : product, categories, cart, checkout etc...
Template groupe : frontend
Situation: frontend or backend

Then, you have to use in your views listing the 3 dropdown filters :
Product/ YourTemplate/ Frontend

See my screenshot :



Hope this will help you to achieved what you need.
Regards

Last edit: 2 years 10 months ago by Philip.

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

  • Posts: 102
  • Thank you received: 12
  • Hikashop Business
2 years 10 months ago #341103

Thanks Philippe,

that worked so far. But I wanted to add a text here (short produkt-description). For this I created a field and using the code:

<!-- Zusatzfeld ProdKurzbeschreibungUebersicht -->
<?php echo $this->element->prodkbeschr; ?>

insert this between image and price (file img_title.php). But this is not displayed. Is this not possible at this point or do I need a different code?

Also the question: Where can I make settings for the product overview page (file name)? I would like to insert a module here with {module header} so that it is only displayed on the product overview and not on the individual product page.

Greetings from Christian

Last edit: 2 years 10 months ago by chli.

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

  • Posts: 83402
  • Thank you received: 13495
  • MODERATOR
2 years 10 months ago #341105

Hi,

Looking at your screenshots, it seems you're using product / listing_img_title there. However, the best to know which view file to edit is to activate the "Display view files" setting in the Hikashop configuration which will display an red border around each view file on the frontend with the name of the view file being used to generate it.
Also, you need to make sure you're editing the view file for the correct template.
Finally, in product / listing_img_title, $this->element contains the information of the current category, not the information of the current product. The information of the current product is in $this->row
So if you want to display the content of a custom product field on a listing, the code should be:

<?php echo $this->row->xxx; ?>
where xxx is the column name of the custom field.

For your other question regarding the product details page. which view file to edit will depend on your settings. By default it should be show_default, but it might be show_tabular or another one. Again, you should use the "Display view files" setting to find out which one is used.

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

  • Posts: 102
  • Thank you received: 12
  • Hikashop Business
2 years 10 months ago #341126

Thanks for the great help. The option with "Display view falls" is really great!

The following user(s) said Thank You: Philip

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

Time to create page: 0.065 seconds
Powered by Kunena Forum