Zen Cart Logo
Forums / General Questions / How to link Product listing on shopping cart?

How to link Product listing on shopping cart?

Views: 1,476

Results 1 to 10 of 10
12 Dec 2011, 2:46 AM
#1
lala_rock avatar

lala_rock

New Zenner

Join Date:
Dec 2011
Posts:
41
Plugin Contributions:
0

How to link Product listing on shopping cart?

Hi fellow zenners, just want to ask help from you. I want to link the product listing on the shopping cart and display the subcategory name.Managed to get the category name but been stumped trying to link the subcategory name to their products listing. Ive read a few threads with regards to this kind of issue too but no answers were provided and ive already searched for days now. Any help is greatly appreciated

12 Dec 2011, 6:59 AM
#2
lala_rock avatar

lala_rock

New Zenner

Join Date:
Dec 2011
Posts:
41
Plugin Contributions:
0

Re: How to link Product listing on shopping cart?

any help please? I tried to use the zen_get_generated_category_path_rev($category_id) but I did not work. Sorry for being such a pain but Im really desperate for help

12 Dec 2011, 3:47 PM
#3
ajeh avatar

ajeh

Oba-san

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

Re: How to link Product listing on shopping cart?

See if this works better to get the cPath you need:

zen_get_generated_category_path_rev(zen_get_product_path($product['id']))

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

13 Dec 2011, 12:25 AM
#4
lala_rock avatar

lala_rock

New Zenner

Join Date:
Dec 2011
Posts:
41
Plugin Contributions:
0

Re: How to link Product listing on shopping cart?

Ajeh:

See if this works better to get the cPath you need:

zen_get_generated_category_path_rev(zen_get_product_path($product['id']))



Thank you ajeh for your response.I used this but it doesnt work either. Did I code it right? I placed this on includes/modules/pages/shopping_cart/header_php.php

$category_id = zen_href_link(zen_get_info_page($products->fields['product_id']),zen_get_generated_category_path_rev(zen_get_product_path($products['id'])));


and this is how I put the $category_id on includes/templates/mytemplate/templates/tpl_shopping_cart_default.php

<a href="<?php echo $product['category_id']; ?>"><font size="-2" color="#898787"><span id="cartProdTitle"><?php echo zen_get_categories_name(zen_products_lookup($product['id'], 'master_categories_id')); ; ?></span></a>



As of now I am working it on my local computer,I will just show you some graphics for you to understand more. This is what I have now in my shopping cart

Attachment #9954

when I click the subcategory name (the one underlined), it leads me here which is wrong. this give me this url <http://localhost:81/cncspares/index.php?main_page=product_info>

Attachment #9953

this is what I want,the listing to be displayed when the subcategory name is clicked.

Hope this make sense.
Thank you in advance.



Regards,
lala
13 Dec 2011, 12:27 AM
#5
lala_rock avatar

lala_rock

New Zenner

Join Date:
Dec 2011
Posts:
41
Plugin Contributions:
0

Re: How to link Product listing on shopping cart?

oops aplologies, the image at the bottom is the wrong one, the 2nd image is the right one (the one I cant achieve as of now)

13 Dec 2011, 1:14 AM
#6
ajeh avatar

ajeh

Oba-san

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

Re: How to link Product listing on shopping cart?

Are you wanting a link to the Category Listing below the Product Name or are you just wanting to display the Category Name below the Product Name?

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

13 Dec 2011, 1:32 AM
#7
lala_rock avatar

lala_rock

New Zenner

Join Date:
Dec 2011
Posts:
41
Plugin Contributions:
0

Re: How to link Product listing on shopping cart?

sorry for the confusion, I managed to display the category name below the product name, what I want now is to link the category name (which is below the product name) to its respective category listing.

13 Dec 2011, 1:51 AM
#8
ajeh avatar

ajeh

Oba-san

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

Re: How to link Product listing on shopping cart?

This will get you the Category Name with the link ... you will need to clean it up a tad for your style info ...

<?php echo '<a href="' . zen_href_link(FILENAME_DEFAULT, 'cPath=' . zen_get_generated_category_path_rev(zen_get_product_path($product['id']))) . '">'; ?><font size="-2" color="#898787"><span id="cartProdTitle"><?php echo zen_get_categories_name_from_product($product['id']); ?></span></a>

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

13 Dec 2011, 2:15 AM
#9
lala_rock avatar

lala_rock

New Zenner

Join Date:
Dec 2011
Posts:
41
Plugin Contributions:
0

Re: How to link Product listing on shopping cart?

Ajeh:

This will get you the Category Name with the link ... you will need to clean it up a tad for your style info ...

<?php echo '<a href="' . zen_href_link(FILENAME_DEFAULT, 'cPath=' . zen_get_generated_category_path_rev(zen_get_product_path($product['id']))) . '">'; ?><font size="-2" color="#898787"><span id="cartProdTitle"><?php echo zen_get_categories_name_from_product($product['id']); ?></span></a>



A big thanks to you ajeh! It worked like a charm :clap::clap:
13 Dec 2011, 2:15 AM
#10
ajeh avatar

ajeh

Oba-san

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

Re: How to link Product listing on shopping cart?

Thanks for the update that this was able to work for you ... :smile:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!