Page 19 of 113 FirstFirst ... 917181920212969 ... LastLast
Results 181 to 190 of 1125
  1. #181

    Default Re: Stocks by attributes

    In answer to my previous question, here the remedy. Many thanks to my flatmate is is somewhate more php literate than I am.

    Instead of changing
    PHP Code:
     $products_options_array[] = array('id' => $products_options->fields['products_options_values_id'],
                          
    'text' => $products_options->fields['products_options_values_name']); 
    with
    PHP Code:
     $products_options_array[] = array('id' => $products_options->fields['products_options_values_id'],
                          
    'text' => $products_options->fields['products_options_values_name'] .' [' $products_options->fields['quantity'] . ' 'TEXT_ATTRIBUTES_PIECES ']'); 
    as per http://www.zen-cart.com/forum/showth...=25987&page=19 post 188, change it to this instead.
    PHP Code:
                      if ($products_options->fields['quantity'] >0){
                        
    $dropdown_instock TEXT_ATTRIBUTES_IN_STOCK;
                      } else {
                        
    $dropdown_instock TEXT_ATTRIBUTES_NOT_IN_STOCK;
                      }
                      
                      
    $products_options_array[] = array('id' => $products_options->fields['products_options_values_id'],
                                            
    'text' => $products_options->fields['products_options_values_name'] .' [' $dropdown_instock ' 'TEXT_ATTRIBUTES_PIECES ']'); 

  2. #182
    Join Date
    Apr 2006
    Location
    Labuan Island
    Posts
    361
    Plugin Contributions
    2

    Default Stocks by attributes

    hi,

    i am having a major problem for these mod. i just do the admin activity reseting this morning and now i cannot set my stocks attributes like before! see my admin_attributes attachments! this is how it looks from the admin after i try to define the stocks for respective attributes! when i go to my cpanel to check the entries for the attributes, i am surprised as the entries for the just-new-added attributes (after the reseting session) in stock_attributes fields, only 'A' appears!!! see the second attachment!

    i hope somebody have a fix to it...

    4u info, i am using danielcor stocks by attributes mod!
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	admin_attributes.JPG 
Views:	550 
Size:	24.6 KB 
ID:	778   Click image for larger version. 

Name:	cpanel_attributes.JPG 
Views:	521 
Size:	33.0 KB 
ID:	779  
    [FONT=Comic Sans MS]"Whether you think you can, or you think you can't... YOU ARE RIGHT."[/FONT]
    [FONT=Comic Sans MS]GOOD LUCK !!![/FONT]

  3. #183
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Stocks by attributes

    Quote Originally Posted by tajul_ashyqin View Post
    i am having a major problem for these mod. i just do the admin activity reseting this morning and now i cannot set my stocks attributes like before! see my admin_attributes attachments! this is how it looks from the admin after i try to define the stocks for respective attributes! when i go to my cpanel to check the entries for the attributes, i am surprised as the entries for the just-new-added attributes (after the reseting session) in stock_attributes fields, only 'A' appears!!! see the second attachment!
    Well that's not the way it's supposed to work Firstly to make sure I have understood correctly ... you reset the admin activity log and then entered new attribute stock values? The values entered before the reset are OK, those entered after have this stock_attribute value of "A"? Is this the first time that you have done an activity log reset with stock by attribute installed and in use?

    The blank value on your screen is no surprise as the data that would normally be in the field where the As are appearing is obtained via an integer index into another table - obviously As can't do that. So the real issue is how did the As get there.

    As an aside this is a direct result of the $*#~@! database structure that this mod has. If integer indexes weren't held as strings in the first place, this simply couldn't happen. Not Danielcor's fault either - like me, he has inherited a structure that goes right back (I suspect) to the original osCommerce mod which spawned this one. Happily Zen Cart does it better and this will be fixed in 1.4.

    Hopefully somebody will come up with a solution to this today. But if not, I have time set aside tomorrow to investigate the problem in my later version of this mod reported by SupuS above and mikajlo on another thread, and I will also look at your problem to see if I might have carried it into my version or if it is already dealt with by one of my fixes and can be retrofitted.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  4. #184
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Found a bug?

    Quote Originally Posted by SupuS View Post
    I found a bug I think ..
    Supus, I have tried twice (several days apart) but not succeeded in replicating the bug that you describe in the way that you describe it. However, I can replicate it in a different way for which the fix is ...

    In includes/classes/order.php find line 696
    $attribute_search array();
    and immediately afterwards insert
    $attribute_stock_left = STOCK_REORDER_LEVEL + 1; // kuroi: prevent false low stock triggers
    I believe that there is a high chance that this will fix your problem also. Please try it and let me know.

    If it doesn't work for you, please provide more specific information about the products that you are buting, the attributes that they have (if any) and their attribute stock level. Thanks.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  5. #185
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Stocks by attributes

    Quote Originally Posted by tajul_ashyqin View Post
    hi,

    i am having a major problem for these mod. i just do the admin activity reseting this morning and now i cannot set my stocks attributes like before! see my admin_attributes attachments! this is how it looks from the admin after i try to define the stocks for respective attributes! when i go to my cpanel to check the entries for the attributes, i am surprised as the entries for the just-new-added attributes (after the reseting session) in stock_attributes fields, only 'A' appears!!! see the second attachment!

    i hope somebody have a fix to it...

    4u info, i am using danielcor stocks by attributes mod!
    Tajul, Could you backup the following tables (ideally with phpMyAdmin) and email a copy to me at the email address using for Stocky by Attributes 1.3.5 beta testing?
    products,
    product attributes,
    products_options,
    products_options_types,
    products_options_values,
    product_options_values_to_products_options,
    products_with_stock_attributes
    Thanks
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  6. #186
    Join Date
    Apr 2006
    Location
    Labuan Island
    Posts
    361
    Plugin Contributions
    2

    Default Re: Stocks by attributes

    yup, that was had happened! it just happened after I reset the admin activity log and entered a new values! before this, I did reset the log but without stock by attributes installed and this was my first time having it after few months of my live site... thanx kuroi for helping me out! I;ll email what ever you need...
    [FONT=Comic Sans MS]"Whether you think you can, or you think you can't... YOU ARE RIGHT."[/FONT]
    [FONT=Comic Sans MS]GOOD LUCK !!![/FONT]

  7. #187
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Stocks by attributes

    Quote Originally Posted by tajul_ashyqin View Post
    yup, that was had happened! it just happened after I reset the admin activity log and entered a new values! before this, I did reset the log but without stock by attributes installed and this was my first time having it after few months of my live site... thanx kuroi for helping me out! I;ll email what ever you need...
    OK. I've tracked down the bug and have a fix. It applies to both Danielcor's 3.0.1 version and my 4.1 version. A 4.2 version for Zen Cart 1.3.5 users has been submitted to the downloads area containing this, the resolution of Supus's issue a few posts back and some improvements to the alignment of data on the stock page.

    If you're running an older version of Zen Cart and are therefore still using Danielcor's version, you will need to apply the first change by hand, but it's fairly straightforward.

    All the changes take place in admin/products_with_attributes_stock.php. Make sure you have the right file (there are several with this name).

    Find the following line (probably 149) and delete it
    $s_mack_noconfirm .="attributes[]=" . $attribute_id . "&"; //s_mack:noconfirm
    Find the following block (probably 155-163)
    if(sizeof($attributes) > 1)
    {
    sort($attributes);
    $stock_attributes = implode(',',$attributes);
    }
    else
    {
    $stock_attributes = $attributes[0];
    }
    and immediately afterwards add
    $s_mack_noconfirm .='attributes=' . $stock_attributes . '&'; //kuroi: to pass string not array
    Find the second instance of the block above (around about 202-210) and delete it.

    Find the following line (now about 205) and delete the bit marked in red
    $query = 'insert into `'.TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK.'` (`products_id`,`stock_attributes`,`quantity`) values ('.$products_id.',"'.$stock_attributes.'",'.$quantity.')';
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  8. #188
    Join Date
    Mar 2006
    Posts
    7
    Plugin Contributions
    0

    Re: Stocks by attributes - Help on stock levels

    Help:::

    I have installed the contribution on a 1.3.5. version and it works really good EXCEPT that the variant stock levels are not updated after an order i.e. remain the same when I purchase stock, the main product "Quantity" reduces correctly, and sync brings it back to the original level, Anyone know how to fix this or can anyone point me to the code that should do this so I can try. Thanks for any help.

  9. #189
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Stocks by attributes - Help on stock levels

    Quote Originally Posted by rkharris View Post
    Help:::

    I have installed the contribution on a 1.3.5. version and it works really good EXCEPT that the variant stock levels are not updated after an order i.e. remain the same when I purchase stock, the main product "Quantity" reduces correctly, and sync brings it back to the original level, Anyone know how to fix this or can anyone point me to the code that should do this so I can try. Thanks for any help.
    Which version of the mod are you running?
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  10. #190
    Join Date
    Apr 2006
    Location
    Labuan Island
    Posts
    361
    Plugin Contributions
    2

    Default Re: Stocks by attributes

    Quote Originally Posted by kuroi View Post
    OK. I've tracked down the bug and have a fix. It applies to both Danielcor's 3.0.1 version and my 4.1 version. A 4.2 version for Zen Cart 1.3.5 users has been submitted to the downloads area containing this, the resolution of Supus's issue a few posts back and some improvements to the alignment of data on the stock page.

    If you're running an older version of Zen Cart and are therefore still using Danielcor's version, you will need to apply the first change by hand, but it's fairly straightforward.

    All the changes take place in admin/products_with_attributes_stock.php. Make sure you have the right file (there are several with this name).

    Find the following line (probably 149) and delete it
    Find the following block (probably 155-163)and immediately afterwards addFind the second instance of the block above (around about 202-210) and delete it.

    Find the following line (now about 205) and delete the bit marked in red

    wow, who are you anyway?! superb, Peter! you are really very helpful person... the fixes solved the problems! million thanx to you... and thank you also for maintaining these mod!
    [FONT=Comic Sans MS]"Whether you think you can, or you think you can't... YOU ARE RIGHT."[/FONT]
    [FONT=Comic Sans MS]GOOD LUCK !!![/FONT]

 

 
Page 19 of 113 FirstFirst ... 917181920212969 ... LastLast

Similar Threads

  1. v139h Stocks of certain products disappearing automatically
    By Lowwi in forum General Questions
    Replies: 4
    Last Post: 11 Aug 2015, 09:09 PM
  2. Installing Stocks by Attribute
    By dragon03kf in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 26 Oct 2008, 07:42 PM
  3. Stocks by attributes
    By hcd888 in forum General Questions
    Replies: 1
    Last Post: 12 May 2008, 08:52 AM
  4. Multiple stocks per product
    By jaycode in forum General Questions
    Replies: 4
    Last Post: 5 Aug 2007, 11:55 AM
  5. Products with attribute stocks
    By Svanis in forum All Other Contributions/Addons
    Replies: 4
    Last Post: 5 Jul 2006, 03:19 AM

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