Skip to main content

how to insert new columns in the products table?

More
15 years 4 months ago #17425 by makles
Hi,

I read a lot around the forum but I didn't find what I need.

I'd like to insert new columns in this table:


www.spizzicando.com/index.php?option=com...name=vini&Itemid=160



I want to insert a region where a product come from, the category of the products and a link to the manufacturer. So 3 new columns editable from backend.

I created a custom field of the table "product" via the menu Display->Custom fields. But this added just the new fields in the product details page.


How can I do what I wish?




Thanks


HikaShop Essential 1.5.0

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

More
15 years 4 months ago #17426 by nicolas
You need to go in the menu Display->Views and edit the file listing_table of the view product. There, you will be able to add new columns and echo the data of your products custom fields in these columns.

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

More
15 years 3 months ago #17482 by makles
Thanks for the tip.

My knowledge of php and html is really poor. I tried to insert a new column (named "categoria"), writing this lines:

<?php } ?>
<th class="hikashop_product_categoria" align="center">
<?php echo JText::_(CATEGORIA);?>
</th>

what is wrong with that?


Thanks


HikaShop Essential 1.5.0

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

More
15 years 3 months ago #17484 by nicolas
You should not add the line <?php } ?>
Also, that will just display the column header.
You also need to add some code few lines below in the foreach in order to display the data of that column for each product:
<td class="hikashop_product_categoria_row">
<?php echo $this->row->categoria; ?>
</td>

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

More
15 years 3 months ago #17488 by makles
It works! (obiousvly)

Thanks a lot for the mini html lesson nicolas! :P

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

Time to create page: 0.211 seconds
Powered by Kunena Forum