Forums / Templates, Stylesheets, Page Layout / Add to Cart w/ Attributes selection on category listing

Add to Cart w/ Attributes selection on category listing

Locked

Views: 780

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
10 Aug 2009, 8:43 PM
#1
kennyhoward avatar

kennyhoward

New Zenner

Join Date:
Jun 2009
Posts:
12
Plugin Contributions:
0

Add to Cart w/ Attributes selection on category listing

I have searched the forum with no solution to be seen.

What I am wanting is a way to replace the "...more info" link with the drop down of product options in the category listing page.

If this is not already built in to zen-cart, and is not available in a module, could someone please point me to the file that would need to be edited in order to customize the cart to get this working. And, of course, the place in the products info page to copy that code that makes the drop down work.

Thanks in advance.

Ken

10 Aug 2009, 8:48 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Add to Cart w/ Attributes selection on category listing

It's not already built-in.

You'll have to alter code in a number of places to deal with that, including things like the following (which I'm just guessing at off the top of my head ... I'm sure the list is way longer):
/includes/modules/product_listing.php
/includes/index_filters/*.php
/includes/main_cart_actions.php
/includes/classes/shopping_cart.php
/includes/templates/YOUR_TEMPLATE/ -- several files related to product listings and search results and maybe categories
and lots more, including adding logic to distinguish one product's attributes from those of another product, etc

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

30 Aug 2009, 5:11 PM
#3
gregtheguru avatar

gregtheguru

New Zenner

Join Date:
May 2005
Posts:
3
Plugin Contributions:
0

Re: Add to Cart w/ Attributes selection on category listing

It's not that difficult. I did it. I created a file (tpl_pid_attributes.php) based on the tpl_modules_attributes.php and included it (as an include) in "/includes/modules/product_listing.php and returned the attributes as a string to var $lc_text. $lc_text .= get_attribs($products_id);.

Since there is a products_listing quick add already in Zen Cart it just required some programming, granted there is a heavier load on MySQL seeks. The pay off is great

10 Dec 2010, 3:05 AM
#4
marketsource avatar

marketsource

New Zenner

Join Date:
Dec 2010
Posts:
4
Plugin Contributions:
0

Re: Add to Cart w/ Attributes selection on category listing

GregTheGuru:

It's not that difficult. I did it. I created a file (tpl_pid_attributes.php) based on the tpl_modules_attributes.php and included it (as an include) in "/includes/modules/product_listing.php and returned the attributes as a string to var $lc_text. $lc_text .= get_attribs($products_id);.

Since there is a products_listing quick add already in Zen Cart it just required some programming, granted there is a heavier load on MySQL seeks. The pay off is great

Would you mind providing the file and the location of the edits?