Zen Cart Logo
Forums / General Questions / Adding and linking category name in shopping cart

Adding and linking category name in shopping cart

Views: 1,057

Results 1 to 8 of 8
19 Sep 2011, 1:15 AM
#1
newbie456 avatar

newbie456

New Zenner

Join Date:
Aug 2011
Posts:
74
Plugin Contributions:
0

Adding and linking category name in shopping cart

Hi there, can anyone help me on how to add and link the category name in the shopping cart?

this is the layout of how it should be

product image
product name
category/subcategory name

any help is very much appreciated.

Thank you huys in advance

24 Sep 2011, 1:22 AM
#2
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Adding and linking category name in shopping cart

Not sure what you mean... can you style up a graphic of how you would like it to look?

26 Sep 2011, 12:06 AM
#3
newbie456 avatar

newbie456

New Zenner

Join Date:
Aug 2011
Posts:
74
Plugin Contributions:
0

Re: Adding and linking category name in shopping cart

thanks schoolboy for the reply. Here is the graphic of how I want my shopping cart page to look like.

Attachment #9696

EHMT-B series is a product and under it is the subcategory name. When I click the subcategory name (the gray text), it should link me to the product listing of that subcategory.

Ive been searching for it and tried to play with codes. My knowledge in php is not broad :no:

Thanks for your help.

26 Sep 2011, 8:09 AM
#4
newbie456 avatar

newbie456

New Zenner

Join Date:
Aug 2011
Posts:
74
Plugin Contributions:
0

Re: Adding and linking category name in shopping cart

Any help please? I know this might be easy for others but ive search it and played with the codes but I cant achieve this.

:oops:

8 Dec 2012, 9:04 AM
#5
yshaqed avatar

yshaqed

New Zenner

Join Date:
Oct 2012
Posts:
5
Plugin Contributions:
0

Re: Adding and linking category name in shopping cart

Ever got a solution for this?

Thanks

Jon

8 Dec 2012, 4:28 PM
#6
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Adding and linking category name in shopping cart

You would need to clean this up ... but on your templates and overrides for the shopping_cart you could use something like this:

       <td class="cartProductDisplay">
<a href="<?php echo $product['linkProductsName']; ?>"><span id="cartImage" class="back"><?php echo $product['productsImage']; ?></span><span id="cartProdTitle"><?php echo $product['productsName'] . '<span class="alert bold">' . $product['flagStockCheck'] . '</span>'; ?></span></a>
<br class="clearBoth" />
<a href="<?php echo zen_href_link(FILENAME_DEFAULT, '&cPath=' . zen_get_generated_category_path_rev(zen_get_products_category_id($product['id']))); ?>"><span id="cartProdTitle"><?php echo zen_get_categories_name_from_product($product['id']); ?></span></a>
<br class="clearBoth" />

You just need to make it pretty ...

8 Dec 2012, 7:02 PM
#7
yshaqed avatar

yshaqed

New Zenner

Join Date:
Oct 2012
Posts:
5
Plugin Contributions:
0

Re: Adding and linking category name in shopping cart

Thank you Ajeh,

Do you know if this will work for linked products as well?

Thanks,

Jon

8 Dec 2012, 8:01 PM
#8
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Adding and linking category name in shopping cart

That goes to the master_categories_id for the Product in the cart ...