Results 1 to 10 of 16

Hybrid View

  1. #1
    Join Date
    Dec 2007
    Location
    South, UK
    Posts
    66
    Plugin Contributions
    0

    Default Problem adding products to cart from product listing page

    Hello, I have an issue when adding products to cart from the product listing page, I've tried a few things to sort it but I'm stuck, I hope someone more knowledgable than I will find it easy to fix....

    I am using v155, with many plugins, the most relevant one here would be Attributes on Product Listing.

    When I set admin config 'Display Cart After Adding Product' to False and then add a product from the listing page, I get the 'Sorry, the product was not found.' page (but the product is correctly added to cart still).

    When I set 'Display Cart After Adding Product' to true, everything works as it should (taken to cart page with product added).

    My ideal scenario is the customer remains on the Product Listing page and a small message is displayed saying 'Product added to cart'. It appears the process is trying to redirect to an incorrect path following the add to cart. It seemsto have something to do with this bit of code from the modules/product_listing.php file....

    Code:
    	
    		$lc_text = '';
    		    $lc_text .= zen_draw_form('add_product_'.$listing->fields['products_id'], 
    			                   zen_href_link(zen_get_info_page($listing->fields['products_id']), zen_get_all_get_params(array('action')) . 
    							   'action=add_product'), 'post', 'enctype="multipart/form-data"');

    Which looks something like this when parsed...

    HTML Code:
     <form name="add_product_103" action="http://bboylaces-dev2.propersafe.net/product_info?cPath=3&amp;sort=20a&amp;number_of_uploads=0&amp;action=add_product" method="post" enctype="multipart/form-data">
    It's this URL (action="URL") that it's trying to forward to after adding to cart. So If I could get this to be the current product listing URL, then it should stay on the page?

    I hope I've explained that correctly and someone might be able to guide me?

    This is a develpoment site the url is - eg - http://bboylaces-dev2.propersafe.net...-fat-laces-c-1

    Please excuse any dust, this is being worked on and not been formatted for phones/tablets/certain browsers etc yet.

    Many thanks in advance

  2. #2
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,949
    Plugin Contributions
    96

    Default Re: Problem adding products to cart from product listing page

    Did you recently add the "Attributes on Product Listing" plugin, or did you upgrade an existing site to 1.5.5?

  3. #3
    Join Date
    Dec 2007
    Location
    South, UK
    Posts
    66
    Plugin Contributions
    0

    Default Re: Problem adding products to cart from product listing page

    Yes it was recently added, to a fresh v155 install.

    Thanks

  4. #4
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,949
    Plugin Contributions
    96

    Default Re: Problem adding products to cart from product listing page

    FWIW, I'd tried that plugin a couple of years ago and found that it didn't work then either!

  5. #5
    Join Date
    Dec 2007
    Location
    South, UK
    Posts
    66
    Plugin Contributions
    0

    Default Re: Problem adding products to cart from product listing page

    Ah thanks I see! Do you mean you had the same problem I've got? Or it didnt work at all?

    Most functionanlity works correctly, which is frustrating... so close to getting it working but just can't get over this last block!

    I guess displaying the cart after adding the product is still an improvement but it would be great if customers can add multiple products without leaving the page.

    Cheers

  6. #6
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,949
    Plugin Contributions
    96

    Default Re: Problem adding products to cart from product listing page

    I'm pretty sure the issue I ran into is the one that you reported.

    The "root cause" lies somewhere in the fact that the default Zen Cart processing, after an add_product action (normally issued from a product_info page) is to return either to that _info page or the shopping_cart.

 

 

Similar Threads

  1. v154 Problems when adding to cart from product listing page
    By TinaS in forum Upgrading to 1.5.x
    Replies: 2
    Last Post: 22 Jan 2015, 01:37 AM
  2. Replies: 16
    Last Post: 13 Jan 2013, 06:10 PM
  3. Question about adding products to my cart from the shopping cart page
    By audleman in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 31 Aug 2010, 07:37 AM
  4. Products with Attributes / Add to Cart buttons on the Product Listing page?
    By Pink in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 2 Jun 2010, 10:04 PM
  5. Adding Product to cart from external page
    By Cylants in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 12 Jun 2009, 05:07 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