Results 1 to 5 of 5
  1. #1
    Join Date
    May 2005
    Location
    England
    Posts
    626
    Plugin Contributions
    0

    Default shopping cart error message for 'display only attributes' in 1.57a

    Hello there,
    I have google product search feeder which requires modification to attributes file. But someone had trouble checking out as they were getting the errors of 'invalid options' on checkout, and display attributes were showing also. I managed to figure it out by removing the following from line 239 onwards in classes/shopping_cart.php:-

    PHP Code:
              if (zen_has_product_attributes($products_id'false') && empty($attributes)) {
          if (!
    zen_requires_attribute_selection($products_id)) {
            
    // Build attributes array; determine correct qty
            
    $attributes = array();
            
    $query $db->Execute("SELECT options_id, options_values_id FROM " TABLE_PRODUCTS_ATTRIBUTES " WHERE products_id = " . (int)$products_id); 
            foreach (
    $query as $attr_rec) {
              
    $attributes[$attr_rec['options_id']] = $attr_rec['options_values_id']; 
            }
            
    $qty += $this->in_cart_product_total_quantity($products_id); 
          }
        } 
    It seems to be added in 1.57a . But doesn't seem to have any detriment (that I can see) after removing it. I am not really a coder at all but can do some things, my question is, can the custom edit mentioned in the other file be integrated into the above code?:-

    PHP Code:
              and      patrib.attributes_display_only 
    The syntax seems different so not sure if that would work. But thought it worth asking, in case the new code is important.

  2. #2
    Join Date
    Jul 2012
    Posts
    16,733
    Plugin Contributions
    17

    Default Re: shopping cart error message for 'display only attributes' in 1.57a

    Ummm. Please explain more... what do you mean that display attributes are showing? I can't say I know of any "display only" attributes that are not to be shown (in a default store anyways)... the area of code that has been removed relates to determining if the product selection requires that the identified attribute have a selection made. If there is additional software that has identified a "new" option name type, then perhaps it is not monitoring for the associated notifier and as a result there is a stop on processing the product...

    As said above, more info needed. :)
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    May 2005
    Location
    England
    Posts
    626
    Plugin Contributions
    0

    Default Re: shopping cart error message for 'display only attributes' in 1.57a

    Hello there, hope you are well, thanks for taking the time to reply.
    The attributes are for Google Shopping, so for example, item A has gender tag, or colour / material. So on the shopping cart those tags were showing, and the code mentioned applied on attributes file stopped it showing on product info pages. Apparently these tags are needed for advertising on Google Shopping ads.

    I realised my wording was not so good, so these connected items I set as 'Used For
    Display Purposes Only:' to 'Yes' in attributes controller. I think the default is set to no, for options that need to be selected like shirt size for example. Sorry about that.

  4. #4
    Join Date
    Jul 2012
    Posts
    16,733
    Plugin Contributions
    17

    Default Re: shopping cart error message for 'display only attributes' in 1.57a

    Quote Originally Posted by HeathenMagic View Post
    Hello there, hope you are well, thanks for taking the time to reply.
    The attributes are for Google Shopping, so for example, item A has gender tag, or colour / material. So on the shopping cart those tags were showing, and the code mentioned applied on attributes file stopped it showing on product info pages. Apparently these tags are needed for advertising on Google Shopping ads.

    I realised my wording was not so good, so these connected items I set as 'Used For
    Display Purposes Only:' to 'Yes' in attributes controller. I think the default is set to no, for options that need to be selected like shirt size for example. Sorry about that.
    Display only in the attributes controller/manager *is* associated to items that are selectable, but with the intention of them not being selected when submitting the product. To provide -nformation through attributes that is to be "displayed" (possible to hide with css), but is not selectable or isn't supposed to offer a choice, then need to back up a step further to the options name manager and change/set the attribute type to "Read Only". This allows the information to be "displayed" to the browser, but is not selectable. Just info to be displayed.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  5. #5
    Join Date
    May 2005
    Location
    England
    Posts
    626
    Plugin Contributions
    0

    Default Re: shopping cart error message for 'display only attributes' in 1.57a

    Quote Originally Posted by mc12345678 View Post
    Display only in the attributes controller/manager *is* associated to items that are selectable, but with the intention of them not being selected when submitting the product. To provide -nformation through attributes that is to be "displayed" (possible to hide with css), but is not selectable or isn't supposed to offer a choice, then need to back up a step further to the options name manager and change/set the attribute type to "Read Only". This allows the information to be "displayed" to the browser, but is not selectable. Just info to be displayed.
    Ah I see. So I think in essence the module author should have used 'read only'. That makes sense. Perhaps they may alter that and I can alter the sql entries somehow en masse for display only attributes. I will leave the code out for now as prevents checkout currently, but its nice to know how I can address in the future. Many thanks :-)

 

 

Similar Threads

  1. v150 Paypal IPN shopping cart error message
    By Catattak in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 18 Sep 2013, 10:13 AM
  2. Replies: 6
    Last Post: 17 May 2013, 05:04 AM
  3. Editing Shopping Cart Sidebox to display only last item added
    By shakes222 in forum General Questions
    Replies: 1
    Last Post: 26 Oct 2010, 05:23 PM
  4. My catalog is for display only - attributes question
    By DocRocks in forum Setting Up Categories, Products, Attributes
    Replies: 10
    Last Post: 10 Mar 2008, 10:33 PM
  5. How can display prices and shopping cart only to registered users
    By Stack A Brown in forum General Questions
    Replies: 3
    Last Post: 6 Apr 2007, 06:41 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