Results 1 to 7 of 7
  1. #1
    Join Date
    Jun 2008
    Location
    Utah, US.
    Posts
    25
    Plugin Contributions
    0

    Default I need help in stopping "adjust_quantity"

    Hello all, let me start off by saying zen cart is GREAT!!!
    and please buy your zen cart members a cup of coffee.

    the problem i am having is this: i have a small t shirt printing business, and when a customer tries to order 2 or more of the same shirt with their own images (that they upload - front and back) instead of the shopping cart seeing this as 2 separate orders, it attempts to add the quantity to the prior order and discards the second set of images.

    in other words:

    customer orders T-Shirt "A', then selects attribute quantity "100" and uploads front + back image.
    Then
    customer orders another T-Shirt "A', then selects attribute quantity "100" and uploads DIFFERENT front + back image.

    the cart does not see these orders as separate, and attempts to combine them and discards the second set of images.

    what am i doing wrong?

    Thanking you in advance.

    NooNe

  2. #2
    Join Date
    Jun 2008
    Location
    Utah, US.
    Posts
    25
    Plugin Contributions
    0

    Default Re: I need help in stopping "adjust_quantity"

    Thanks, got it.

  3. #3
    Join Date
    Apr 2004
    Location
    UK
    Posts
    5,821
    Plugin Contributions
    2

    Default Re: I need help in stopping "adjust_quantity"

    Quote Originally Posted by NooNe View Post
    Thanks, got it.
    Why not help other forum members, who may experience same problem,
    by explaining how you achieved this?

  4. #4
    Join Date
    Jun 2008
    Location
    Utah, US.
    Posts
    25
    Plugin Contributions
    0

    Default Re: I need help in stopping "adjust_quantity"

    LOL...you asked for it!!...lol
    to begin, i am a novice to intermediate lamp programmer, and i have not yet had time to truly test my results, however, my initial test of adding the same item + attributes + different front and back image uploads seems to be successful as they all listed as separate products with different images and all totals were added-totaled correctly, but that is as far as i have gotten. I have not attempted a full checkout test.

    what i did is as follows:

    includes/classes/shopping_cart.php

    line: 256

    changed:
    $qty = $this->adjust_quantity($qty, $products_id, 'shopping_cart');

    if ($this->in_cart($products_id)) {
    $this->update_quantity($products_id, $qty, $attributes);
    } else {
    $this->contents[] = array($products_id);
    $this->contents[$products_id] = array('qty' => (float)$qty);

    Into:
    //$qty = $this->adjust_quantity($qty, $products_id, 'shopping_cart');

    //if ($this->in_cart($products_id)) {
    // $this->update_quantity($products_id, $qty, $attributes);
    // } else {
    $this->contents[] = array($products_id);
    $this->contents[$products_id] = array('qty' => (float)$qty);

    my attempt was to kill the "auto product adjustment" of same $product_id.

    This could be the answer to my dreams, or i may have totally broken my cart.\
    FOLLOW ME AT YOUR OWN PERIL!!!.....lol

    Misty, i hope this is usefull, and i will get back here soon with my results.

    NooNe.

  5. #5
    Join Date
    Apr 2004
    Location
    UK
    Posts
    5,821
    Plugin Contributions
    2

    Default Re: I need help in stopping "adjust_quantity"

    Misty, i hope this is usefull, and i will get back here soon with my results.
    Excellent, BUT obviously you need to confirm that code changes
    to indeed solve problem.

  6. #6
    Join Date
    Jun 2008
    Location
    Utah, US.
    Posts
    25
    Plugin Contributions
    0

    Default Re: I need help in stopping "adjust_quantity"

    Misty (and all others), i have completed a full checkout, and all went well.
    The orders were added - totaled and processed through PayPal with no problems.
    and the orders are displayed as expected in: My Account, Account history, customer notification email, admin new purchase email, and admin new orders.

    The multiple orders were separated as hoped, and not seen by the cart as ordering more of the same, success.

    NooNe

  7. #7
    Join Date
    Apr 2004
    Location
    UK
    Posts
    5,821
    Plugin Contributions
    2

    Default Re: I need help in stopping "adjust_quantity"

    Thanks for confirming that your coding solution
    worked to solve problem

 

 

Similar Threads

  1. can i have products of types "Purchase" and "View only"...need both
    By aniketanyee in forum Customization from the Admin
    Replies: 2
    Last Post: 24 Nov 2012, 11:06 AM
  2. Using "table" shipping but need one category to be "Flat Rate"
    By GTHENRY in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 27 Apr 2011, 08:35 PM
  3. Need to change the default quanity for "each" to "Set" on certain products
    By whiskermouse in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 24 Apr 2010, 02:46 AM
  4. Need help "relocating my "download" folder
    By Micki in forum General Questions
    Replies: 0
    Last Post: 19 Mar 2009, 06:01 AM
  5. Need help changing text size for: "Congratulations" & "Welcome Guest" on main page
    By STFlats in forum Templates, Stylesheets, Page Layout
    Replies: 12
    Last Post: 16 Apr 2007, 04:32 AM

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