cs-cart ver 2.1.1
I am using a block on the product pages that show matching products.
From the admin side, when adding products to the block, you click on the “Add Product” link and a popup box appears. There is a searchable list. This list only shows PRODUCT NAME. How might I be able to add product code next to product name? Looks like this is a simple table. I think I can figure out how to tell it to show this, but I don’t know which template to edit.
Also one other item of help. In some of the “Add Product” popups there are two buttons at the bottom: “Add products and close” & “Add products”. This would be help in the blocks area that I am asking about above. It looks like these popups are the basicly the same.
Thanks for any help,
After some trial and error, I have acomplished the first part.
In the file /skins/basic/admin/views/products/components/products_list.tpl
I made these changes. I don’t understand hooks enough to know how this should be done.
```php
{if $hide_amount}
{/if}
[COLOR="Red"]{$lang.code}[/COLOR]
{$lang.product_name}
{if $show_price}
{$lang.price}
{/if}
{if !$hide_amount}
{$lang.quantity}
{/if}
{if !$checkbox_name}{assign var="checkbox_name" value="add_products_ids"}{/if}
{foreach from=$products item=product}
{if $hide_amount}
{/if}
[COLOR="red"]
{$product.product_code|unescape}{include file="views/products/components/select_product_options.tpl" id=$product.product_id product_options=$product.product_options name="product_data" show_aoc=$show_aoc additional_class=$additional_class}[/COLOR]
{$product.product|unescape}{include file="views/products/components/select_product_options.tpl" id=$product.product_id product_options=$product.product_options name="product_data" show_aoc=$show_aoc additional_class=$additional_class}
```
Still need to fugure out the second part about the add products vs add products and close.
[quote name=‘dsdewitt’]Also one other item of help. In some of the “Add Product” popups there are two buttons at the bottom: “Add products and close” & “Add products”. This would be help in the blocks area that I am asking about above. It looks like these popups are the basicly the same.
[/QUOTE]
I have found this is in the /skins/basic/admin/pickers/products_picker.tpl
What I need help with how to code this. I see for other places this is used, it is populating a table on page called from, then saved. Where as the block must just be updating the database.
Thanks for any help
Has anyone a thought on part 2.
Thanks for your help,