Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2009
    Posts
    12
    Plugin Contributions
    0

    Default 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

  2. #2
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default 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.

  3. #3
    Join Date
    May 2005
    Posts
    3
    Plugin Contributions
    0

    Idea or Suggestion 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

  4. #4
    Join Date
    Dec 2010
    Posts
    4
    Plugin Contributions
    0

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

    Quote Originally Posted by GregTheGuru View Post
    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?

 

 

Similar Threads

  1. v139a product listing page, read only attributes, add to cart button
    By buildingblocks in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 20 Sep 2013, 06:03 AM
  2. add to cart button on product listing (for products with attributes)
    By easy3dsource in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 10 Apr 2011, 06:08 PM
  3. ADD TO CART on Category Listing in One Category only
    By ald0413 in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 31 Jan 2011, 07:05 PM
  4. Removing add to cart on category listing page
    By nightdesigns in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 16 Jun 2009, 09:19 PM
  5. Enable "Add-to-Cart" in category listing, while using attributes
    By adonkat in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 2 Jul 2008, 07:28 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg