Page 1 of 2 12 LastLast
Results 1 to 10 of 14
  1. #1
    Join Date
    Nov 2003
    Location
    Haarlem | Netherlands
    Posts
    1,987
    Plugin Contributions
    15

    Default [Done v1.3.9f] Add to cart fails on review page (1.3.6/1.3.7)

    Today I noticed clicking on "Add to cart" from product_reviews_info fails and redirects to:

    index.php?main_page=product_info&products_id=0
    Which results in:
    Sorry, the product was not found.
    and no product is added to the cart.

    Since it happens on both a modified 1.3.6 shop and a stock 1.3.7 (current) shop I think it's a bug.

    Note that it only happens when "Display Cart After Adding Product" is set to false! (other 1.3.7 settings default) When set to true it works fine.

  2. #2
    Join Date
    Nov 2003
    Location
    Haarlem | Netherlands
    Posts
    1,987
    Plugin Contributions
    15

    Default Re: Add to cart fails on review page (1.3.6/1.3.7)

    Woops, sorry. The product is added to the cart. It only seems like it isn't added, because the the scripts says the product is not found and does not show the added to cart message.

  3. #3
    Join Date
    Nov 2003
    Location
    Haarlem | Netherlands
    Posts
    1,987
    Plugin Contributions
    15

    Default Re: Add to cart fails on review page (1.3.6/1.3.7)

    The product_reviews page has the same problem.

    For the "fun" (and because it seemed weird nobody would have noticed this before) I tried to set register globals On, but it makes no difference.

  4. #4
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Add to cart fails on review page (1.3.6/1.3.7)

    Seems to be a problem with "action=buy_now" vs the more frequently-used "action=add_product" used on the product_info page.

    Will have to investigate ...
    .

    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.

  5. #5
    Join Date
    Nov 2003
    Location
    Haarlem | Netherlands
    Posts
    1,987
    Plugin Contributions
    15

    Default Re: Add to cart fails on review page (1.3.6/1.3.7)

    Thanks for the reply DrByte

    I took a quick look at the code myself, but I got lost...

  6. #6
    Join Date
    Nov 2003
    Location
    Haarlem | Netherlands
    Posts
    1,987
    Plugin Contributions
    15

    Default Re: Add to cart fails on review page (1.3.6/1.3.7)

    Since I think it is very off putting, and it's better not having buy now buttons than not working ones, I decided to comment the following lines out FTB:
    Code:
    echo zen_get_buy_now_button($review->fields['products_id'], $the_button, $products_link) . '<br />' . zen_get_products_quantity_min_units_display($review->fields['products_id']);

    Code:
    echo zen_get_buy_now_button($review_info->fields['products_id'], $the_button, $products_link) . '<br />' . zen_get_products_quantity_min_units_display($review_info->fields['products_id']);
    in
    tpl_product_reviews_default.php
    and:
    tpl_product_reviews_info_default.php


    hth

  7. #7
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Add to cart fails on review page (1.3.6/1.3.7)

    Could you test that if you change approximately line 1704 of the actionBuyNow in the file:
    /includes/classes/shopping_cart.php

    from:
    PHP Code:
        zen_redirect(zen_href_link($gotozen_get_all_get_params($parameters))); 
    to read:
    PHP Code:
        zen_redirect(zen_href_link($gotozen_get_all_get_params($parameters$products_id) . 'products_id=' $_GET['products_id'])); 
    Does this fix this issue on all review pages for you?
    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: v1.5.5]
    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!

  8. #8
    Join Date
    Nov 2003
    Location
    Haarlem | Netherlands
    Posts
    1,987
    Plugin Contributions
    15

    Default Re: Add to cart fails on review page (1.3.6/1.3.7)

    Hi Ajeh,

    thanks for looking into this :-) I found that line at #1698 (and 4 other places) and replaced it.

    On the product_reviews page it works, the product is added, and the message stack shows it is

    At the product_reviews_info page however the product is added, but the message stack does not show. And the page redirects to the product_reviews page.


    Just to be sure I replaced all instances and tried again, but that does not help.

  9. #9
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Add to cart fails on review page (1.3.6/1.3.7)

    hmm ... odd ...

    You should only need to touch that 1 line as you are using the case actionBuyNow from the shopping_cart when using the buy_now action on those pages ...

    And this is v1.3.7 correct?

    No funky add-ons that might have messed with the shopping_cart class or the main_cart_actions module?

    And if you point at the buttons on any of the review pages you should be seeing the action=buy_now on them ...

    And of course you peeked at your site in Classic just in case your template is all moofed up ...
    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: v1.5.5]
    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!

  10. #10
    Join Date
    Nov 2003
    Location
    Haarlem | Netherlands
    Posts
    1,987
    Plugin Contributions
    15

    Default Re: Add to cart fails on review page (1.3.6/1.3.7)

    It's a default 1.3.7 install using the default template that comes with it (not even sure if that one is called Classic ). The only setting I changed is the shopping cart display.

    Shouldn't the line be:
    Code:
    zen_redirect(zen_href_link($goto, zen_get_all_get_params($parameters) . 'products_id=' . $_GET['products_id']));
    ? Not that it makes any difference (tried both), just wondering.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 26
    Last Post: 25 Jul 2016, 12:20 PM
  2. v153 [Done v1.6.0] Installer database upgrade db-error fails
    By Jarkko in forum Bug Reports
    Replies: 9
    Last Post: 12 Feb 2015, 09:00 PM
  3. v139f Pay Pal Express Button on Cart Page Fails: Returns to Step 2, with no payment method
    By addlink in forum Built-in Shipping and Payment Modules
    Replies: 3
    Last Post: 25 Nov 2013, 07:37 PM
  4. Add to Cart Fails
    By tstedrow in forum Basic Configuration
    Replies: 2
    Last Post: 14 Oct 2009, 12:26 PM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR