- Posts: 8
- Thank you received: 0
Frontend product listing
- apelsinskal
-
Topic Author
- Offline
At the moment there is
Photo Product Article no Price
I want to add two more fields here. How do I do this?
I also wonder, why the "add to cart" button doesn't show on the product listing? I only have a field for writing amount, but no "add"-button.
If I go to my menu item - Products (Products listing) - Advanced options - HikaShop Options - Display "Add to cart" button, this is set to "yes".
Please Log in or Create an account to join the conversation.
- Posts: 12953
- Thank you received: 1778
1. I think that you'll have to edit the code of the "listing_tab" file of the "product" view of your front-end template through "Hikashop->Display->Views".
2. Does your product have :
- quantity ?
- price ?
Please Log in or Create an account to join the conversation.
- apelsinskal
-
Topic Author
- Offline
- Posts: 8
- Thank you received: 0
Edit the code, hmmm.... don't know if I will suceed with that. I have the free version of hikashop, would I get more options to product listing if I buy the full version?
Please Log in or Create an account to join the conversation.
- Posts: 12953
- Thank you received: 1778
Sure you'll get more options, but I think that editing the code will be the best solution.
2. Can you tell me how did you configured:
- Your "Catalogue mode" option through "Hikashop->System->Configuration->'Features'" ?
- Your product listing configuration page ("Hikahsop->Display->Content menus->'YOUR PRODUCT LISTING'"")?
Please Log in or Create an account to join the conversation.
- apelsinskal
-
Topic Author
- Offline
- Posts: 8
- Thank you received: 0
Please Log in or Create an account to join the conversation.
- Posts: 12953
- Thank you received: 1778
Please Log in or Create an account to join the conversation.
- apelsinskal
-
Topic Author
- Offline
- Posts: 8
- Thank you received: 0
Please Log in or Create an account to join the conversation.
- Posts: 12953
- Thank you received: 1778
Please Log in or Create an account to join the conversation.
- apelsinskal
-
Topic Author
- Offline
- Posts: 8
- Thank you received: 0
I tried to copy/paste some code (product name) in the listing table, just to see if I get product name twice (easiest way to see if it works) but I couldn't see any changes. Do I have to edit the code on more places to succeed?
Please Log in or Create an account to join the conversation.
- apelsinskal
-
Topic Author
- Offline
- Posts: 8
- Thank you received: 0
Please Log in or Create an account to join the conversation.
- Posts: 12953
- Thank you received: 1778
You can edit the file listing_img_title of the view product via the menu Display->Views and add the code:
$this->params->set('show_quantity_field', 1);
at the beginning after the first <?php tag.
2. Can you tell me what file/view did you edited and how ?
Please Log in or Create an account to join the conversation.
- apelsinskal
-
Topic Author
- Offline
- Posts: 8
- Thank you received: 0
The one listed under Client: Front end / Template: protostar / View: Product / File: listing_img_title
Please Log in or Create an account to join the conversation.
- Posts: 12953
- Thank you received: 1778
1. Edit the file "listing_img_title" of the view "product" via the menu Display->Views and just add a line of code to display the description:
2. Go to your product listing (which have the ID number 117) configuration page, and set the "Link to the product page" option to NO
Please Log in or Create an account to join the conversation.
- apelsinskal
-
Topic Author
- Offline
- Posts: 8
- Thank you received: 0
Looks like it has to be some more code here. All the other columns has code like:
<!-- PRODUCT IMG -->
code here
<!-- EO PRODUCT IMG -->
<!-- PRODUCT PRICE -->
code here
<!-- EO PRODUCT PRICE -->
<!-- PRODUCT NAME -->
code here
<!-- EO PRODUCT NAME -->
If I want to add for example 4 more rows in the table listing, (description, url, meta description, keywords just to make it easy with already available fields on the product page), don't I need to add this type of code for each column?
Please Log in or Create an account to join the conversation.
So you need to edit the file "listing_table".
The listing_img_title file is only used for DIV layout listings so it won't change anything if you modify it.
For example, for the description you would have to add the code:
<th class="title" align="center">Description</th>
before the first line:
<?php if($this->params->get('show_vote_product')){ ?>
and the code :
<td><?php echo $this->row->product_description; ?></td>
before the second line:
<?php if($this->params->get('show_vote_product')){ ?>
And do that for each field in a similar maner in the listing_table view file.
Please Log in or Create an account to join the conversation.