Results 1 to 6 of 6
  1. #1
    Join Date
    Feb 2007
    Posts
    1,704
    Plugin Contributions
    0

    Default attribute error on order - wierd

    i have a product that has 3 attributes (colours) which are priced different and each colour appart from the default adds extra money yadda yadda yadaa

    Been working fine for yeas etc but today got an order through and customer ordered a couple of products but on the order 2 items are not showing the attributes... weird.... price shows the default product attribute but doesn't say the default colour under the item as normal.

    i did a trest order of the same items and worked fie...

    any ideas?? here is the order

    2 x Shower Panel Board
    - Shower Board Sizes: 598 x 2400 x 11mm
    - Shower Board Options: Clean Cut
    1 x Corner Type A
    - :
    1 x End Caps Type C
    - :

    should say

    1 x End Caps Type C
    - : satin silver

  2. #2
    Join Date
    Feb 2007
    Posts
    1,704
    Plugin Contributions
    0

    Default Re: attribute error on order - wierd

    called the customer.... as i needed to ask what they wanted and asked if they had any problems etc and said no problems but did say, they had the items in the card since before christmas. I have since changed the attributes on these items since then.

    so is there a way of making cards only store for say 90 days?? as this could be the issue

  3. #3
    Join Date
    Feb 2007
    Posts
    1,704
    Plugin Contributions
    0

    Default Re: attribute error on order - wierd

    anyone know if this is possible??

    so is there a way of making shopping carts only store for say 90 days??

  4. #4
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,151
    Plugin Contributions
    11

    Default Re: attribute error on order - wierd

    Not sure how long a registered user's cart will survive but make sure your default attributes are set to display only. Most of these problems are because of a Please Select that can be selected.

  5. #5
    Join Date
    Feb 2007
    Posts
    1,704
    Plugin Contributions
    0

    Default Re: attribute error on order - wierd

    there is defo no please select on the item in question, problem was from the customer adding a product to cart with an attribute months ago, then before checking out we changed the atributes on the product, but the cart stored the old atributes and allowed checkout

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

    Default Re: attribute error on order - wierd

    In v1.5, an additional check of Products/Attributes was added for when Attributes are removed from a Product to prevent this ...

    I am not sure how difficult it might be to back port that change to v1.3.9h, to add the extra check needed for when a customer has a saved cart of Products with old Attributes that have been removed ...

    I have not tested this completely, but you can try adding the code in RED:
    /includes/classes/shopping_cart.php

    Code:
    // validate cart contents for checkout
            if ($check_for_valid_cart == true) {
              $fix_once = 0;
    
              // Check products_status if not already
              $check_status = $products->fields['products_status'];
              if ( $check_status == 0 ) {
                $fix_once ++;
                $_SESSION['valid_to_checkout'] = false;
                $_SESSION['cart_errors'] .= ERROR_PRODUCT . $products->fields['products_name'] . ERROR_PRODUCT_STATUS_SHOPPING_CART . '<br />';
                $this->remove($products_id);
    // bof: extra check for products/attributes
              } else {
                if (isset($this->contents[$products_id]['attributes'])) {
                  reset($this->contents[$products_id]['attributes']);
                  $chkcount = 0;
                  while (list(, $value) = each($this->contents[$products_id]['attributes'])) {
                    $chkcount ++;
                    $chk_attributes_exist_query = "select products_id
                                              from " . TABLE_PRODUCTS_ATTRIBUTES . " pa
                                              where pa.products_id = '" . (int)$products_id . "'
                                              and pa.options_values_id = '" . (int)$value . "'";
    
                    $chk_attributes_exist = $db->Execute($chk_attributes_exist_query);
    //echo 'what is it: ' . ' : ' . $products_id . ' - ' . $value . ' records: ' . $chk_attributes_exist->RecordCount() . ' vs ' . print_r($this->contents[$products_id]) . '<br>';
                    if ($chk_attributes_exist->EOF) {
                      $fix_once ++;
                      $_SESSION['valid_to_checkout'] = false;
                      $_SESSION['cart_errors'] .= ERROR_PRODUCT_ATTRIBUTES . $products->fields['products_name'] . ERROR_PRODUCT_STATUS_SHOPPING_CART_ATTRIBUTES . '<br />';
                      $this->remove($products_id);
                      break;
                    }
                  }
                }
    // bof: extra check for products/attributes
              }
    
              // check only if valid products_status
    and add the language defines for:
    Code:
      define('ERROR_PRODUCT_ATTRIBUTES','<br />The item: ');
      define('ERROR_PRODUCT_STATUS_SHOPPING_CART_ATTRIBUTES','<br />We are sorry but selected options have changed for this product and have been removed from our inventory at this time.<br />This item has been removed from your shopping cart.');
    to the bottom of english.php (these will be in that file when you upgrade to v1.5, in the future)
    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!

 

 

Similar Threads

  1. Wierd attribute code showing in drop down menu
    By Newmanz in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 18 Mar 2010, 11:45 AM
  2. Attribute wierd problem?
    By brucehere in forum General Questions
    Replies: 2
    Last Post: 7 Aug 2008, 04:00 AM
  3. Wierd error
    By hllight in forum General Questions
    Replies: 0
    Last Post: 30 Aug 2007, 03:35 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