Page 159 of 359 FirstFirst ... 59109149157158159160161169209259 ... LastLast
Results 1,581 to 1,590 of 3589
  1. #1581
    Join Date
    Jan 2004
    Posts
    66,419
    Blog Entries
    7
    Plugin Contributions
    277

    Default Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

    Custom code.
    So, you trace that back to figure out why the $attributes array was empty.

    Chances are some query or criteria or selection in however you set up your attributes ... failed.

    Keep following the trail until you find the solution.
    .

    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.

  2. #1582
    Join Date
    Feb 2004
    Posts
    1,278
    Plugin Contributions
    0

    Default Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

    $attributes = $db->Execute($attributes_query);

    /home/nothingb/public_html/includes/functions/functions_lookups.php
    Line #420 : $attributes_query = "select pa.products_attributes_id

    Line #425 : $attributes_query = "select pa.products_attributes_id

    Line #430 : $attributes = $db->Execute($attributes_query);

    Line #444 : $attributes_query = "select sum(options_values_price) as total

    Line #448 : $attributes = $db->Execute($attributes_query);
    Anything here??

  3. #1583
    Join Date
    Feb 2004
    Posts
    1,278
    Plugin Contributions
    0

    Default Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

    All searches for $db

    come up

    $db = new queryFactory();

  4. #1584
    Join Date
    Feb 2004
    Posts
    1,278
    Plugin Contributions
    0

    Default Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

    Is the problem in here?

    Line #444 : $attributes_query = "select sum(options_values_price) as total

  5. #1585
    Join Date
    Feb 2004
    Posts
    1,278
    Plugin Contributions
    0

    Default Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

    A snippit from this section that has $attributes_query

    /*
    * Check if product has attributes
    */
    function zen_has_product_attributes($products_id, $not_readonly = 'true') {
    global $db;

    if (PRODUCTS_OPTIONS_TYPE_READONLY_IGNORED == '1' and $not_readonly == 'true') {
    // don't include READONLY attributes to determin if attributes must be selected to add to cart
    $attributes_query = "select pa.products_attributes_id
    from " . TABLE_PRODUCTS_ATTRIBUTES . " pa left join " . TABLE_PRODUCTS_OPTIONS . " po on pa.options_id = po.products_options_id
    where pa.products_id = '" . (int)$products_id . "' and po.products_options_type != '" . PRODUCTS_OPTIONS_TYPE_READONLY . "' limit 1";
    } else {
    // regardless of READONLY attributes no add to cart buttons
    $attributes_query = "select pa.products_attributes_id
    from " . TABLE_PRODUCTS_ATTRIBUTES . " pa
    where pa.products_id = '" . (int)$products_id . "' limit 1";
    }

    $attributes = $db->Execute($attributes_query);

    if ($attributes->recordCount() > 0 && $attributes->fields['products_attributes_id'] > 0) {
    return true;
    } else {
    return false;
    }
    }

    /*
    * Check if product has attributes values
    */
    function zen_has_product_attributes_values($products_id) {
    global $db;
    $attributes_query = "select sum(options_values_price) as total
    from " . TABLE_PRODUCTS_ATTRIBUTES . "
    where products_id = '" . (int)$products_id . "'";

    $attributes = $db->Execute($attributes_query);

    if ($attributes->fields['total'] != 0) {
    return true;
    } else {
    return false;
    }
    }

  6. #1586
    Join Date
    Feb 2004
    Posts
    1,278
    Plugin Contributions
    0

    Default Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

    Sadly... I am trying... But not sure what I am doing...

  7. #1587
    Join Date
    Jan 2011
    Posts
    65
    Plugin Contributions
    0

    Default Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

    Quote Originally Posted by milobloom View Post
    Sadly... I am trying... But not sure what I am doing...
    Can you provide more details?

    What specific variation of SBA did you install? I'm assuming you're on ZC 1.3.9h or older version?

    Did you modify any code in the files from the SBA addon module? Or did you install perhaps other addon modules that may have overwritten files related to the SBA addon instead of properly merging the code?

    You linked a specific product in your post, is this product the cause of the error? Can you be more specific about how the error is triggered?

    What exactly are you doing in the ZC admin that causes that error to be displayed, and does this error only happen with a few specific products, or does it happen to all of your products?

    Based on the assumption that you did not modify any of the SBA code, and you did not install other addons that may have overwritten SBA code...

    Then the problem as Dr. Byte pointed out is that your $attributes array is coming up as empty, and the reason is not because of an error in the code, but an error in how you may have programmed your product's attributes.

    Looking at the specific product that you linked, I noticed that it was not assigned any specific attributes. It appears as if most of your toddler items are assigned either the 0-6m attribute or the 6-12m attribute, except this one. Does the problem persist if you assign it a specific attribute? Or is the error what's actually preventing you from adding specific attributes to this product?

    Need all these questions answered to help you further.

  8. #1588
    Join Date
    Jan 2009
    Location
    UK
    Posts
    17
    Plugin Contributions
    0

    Default Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

    Can anyone steer me in the right direction please?
    In Admin > Catalog > Products with attributes stock, is it possible to sort the attributes for each product in any way other than the default 'primary attribute'? I'm using v1.3.9h with SBA v 1.4.14. I'd like to sort by colour then by size, unfortunately, some products were added with size as the primary attribute and others with colour as the primary attribute. Thanks

  9. #1589
    Join Date
    Dec 2010
    Posts
    362
    Plugin Contributions
    0

    Default Re: Stock by Attribute v4.0 for Zen Cart 1.3.5

    Is there a way to change the order in which the attributes appear in the admin interface in this? I'm using ZC 1.3.9h.

    Thanks,

    John

  10. #1590
    Join Date
    Jan 2009
    Location
    UK
    Posts
    17
    Plugin Contributions
    0

    Default Re: Stock by Attribute v4.0 for Zen Cart 1.3.5

    John,

    The attributes are ordered by primary attribute. The primary attribute is the attribute you inserted first for each product. Within the primary attribute, the order is determined by the sort order of the primary attribute. For example, if you added colour before size, and within colour you have blue- sort order 10, red - sort order 20, then the SBA order will be 1st blue size x, blue size y followed by red size x, red size y. You can change the sort order within an attribute via admin>catalog>option value manager. I don't know how you change the primary attribute.

 

 

Similar Threads

  1. Problems with addon: Dynamic Drop Downs for Stock By Attribute
    By Dunk in forum All Other Contributions/Addons
    Replies: 56
    Last Post: 30 Apr 2014, 07:55 PM
  2. MySQL Problem with Product with Attribute Stock addon
    By rtwingfield in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 20 Sep 2011, 03:35 PM
  3. Hide Zero Quantity Attributes with attribute-stock addon
    By leevil123 in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 11 Feb 2010, 05:06 PM
  4. Replies: 4
    Last Post: 22 Jan 2010, 10:43 PM
  5. Price Products in the grid by 'Stock by Attribute' addon?
    By Salixia in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 27 Oct 2009, 06:03 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