Including SKU in products_grid list (2.1.4)

I am hoping that someone could provide the information I need to include the sku within the Products Grid list.



I have checked out the blocks/list_templates/products_grid.tpl and blocks/product_list_templates/products_grid.tpl but unfortunately cannot see how or where I would need to include the sku within the list template.



the customer/blocks/product_list_templates/products_grid.tpl shows show_sku=true , so am assuming that the basis is there however how would I include the sku within the template (given that I have been looking in the right place)?



Many and all thanks for help…



Cheers

Christine

Hello Christine,



Some code modifications are required to implement this feature. We would be happy to assist you in this matter within our technical support service. Please contact us via Customer Help Desk if you have support credits or an active support period.





Anastasiya Kozlova

CS-Cart Support Team

Am more than happy to do that do that but; would you provide the “how to” so that I gain knowledge rather than just a service? I prefer to learn rather than just have things “done” without learning something but not game to go around messing with files unless I have an idea on what it is I need to achieve.



I have actually managed to make that change in 2.2.1 (development) by just adding

{assign var="sku" value="sku_$obj_id"}{$smarty.capture.$sku} after the {if $item_number == "Y"}{$cur_number}. {math equation="num + 1" num=$cur_number assign="cur_number"}{/if}{assign var="name" value="name_$obj_id"}{$smarty.capture.$name} however this method does not work for 2.1.4 (live site).



Cheers

Christine

[font=“Verdana”]Great work!



Well done, good to see you got it working.

Do you have a method of getting it to work in 2.2.1? (we are just about to upgrade to 2.2.2 Professional)



Thank you very very very much![/font]

[quote name='UniDevelopers' timestamp='1314868777' post='120763']

[font=“Verdana”]Great work!



Well done, good to see you got it working.

Do you have a method of getting it to work in 2.2.1? (we are just about to upgrade to 2.2.2 Professional)



Thank you very very very much![/font]

[/quote]





Hi there - yes the above solution worked for 2.2.1 but not 2.1.4 so you should be able to do that, hopefully, the same for 2.2.2 before or after upgrade (not entirely sure on which order it should be done).



Cheers

and hope this helped.

[font=“Verdana”]Hang on… Are you referencing the Product Code field (under the product - or the product options) as the SKU, or a completly different, unique, custom field?

We use our own product code for products (Alpha-Numeric) and our suppliers also have their own (often the same across all sizes/colours/variations etc).



Oh… Hang on… What pages can this be made visible on? (Customer pages: Categories, Product, Search, Order, Invoice pages? Admin Page: Product Lists, Product Page, Reports, Orders, Export/Sync → QuickBooks etc?)



Just thought I should clarify!



Thanks!

:D[/font]

[quote name=‘UniDevelopers’ timestamp=‘1314888403’ post=‘120783’]

[font=“Verdana”]Hang on… Are you referencing the Product Code field (under the product - or the product options) as the SKU, or a completly different, unique, custom field?

We use our own product code for products (Alpha-Numeric) and our suppliers also have their own (often the same across all sizes/colours/variations etc).



Oh… Hang on… What pages can this be made visible on? (Customer pages: Categories, Product, Search, Order, Invoice pages? Admin Page: Product Lists, Product Page, Reports, Orders, Export/Sync → QuickBooks etc?)



Just thought I should clarify!



Thanks!

:D[/font]

[/quote]





Hiya UniDevelopers,



Not being a programmer at all I am able, at times, to get some things done from a logical perspective, and luckily for me this was one of those times.



My solution above was to include the product SKU within the product grid list, that was not originally on that view at the time.



Based on the above I would not like to be the one to clarify anything for someone else.



Sorry I cannot offer further clarification on this.



Cheers

Christine