Page 5 of 321 FirstFirst ... 345671555105 ... LastLast
Results 41 to 50 of 3204
  1. #41
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,611
    Plugin Contributions
    25

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

    Quote Originally Posted by trollboy View Post
    That is what I thought should happen, but t doesn't seem to be working properly. When I look at the Stock by Attributes admin page, the stock appears at the product level for any products for which I haven't set indivdual stocks by attribute. However, when I try and buy one of these products, the shopping cart tells me that there s not enough stock. If I "synchronise stock" on the Stock by Attributes admin page the stock value gets reset to zero, It seems as though the stock at the product level is not being recognised.
    Any ideas as to what might be wrong?
    Sorry my earlier response wasn't very well-crafted. I'll try to make it a little more clear, though I fear you won't much like the answer.

    The way the mod works is that once you enable stock by attribute it takes over the management of stock levels for all products with attributes. So if you have a product with attributes for which you do not create any variants and give them stock, then when a customer tries to buy them, the mod will return zero stock levels. This is not immediately obvious as the product stock level is not updated when the mod is first installed, but when you sync the stock, the product stock will go to zero. Products that have no attributes will continue to use the product stock level.

    You can return to using only product level stock figures by uninstalling the mod (basically by over-writing the six core Zen Cart files changed by this mode and listed in the release notes with the equivalents from a default Zen Cart installation. You would then need to reset the stock for those products to which you had allocated product variants or synced the stock values.

    Can you tell me a little more background to what you are trying to do so that I can take it into account for future Attribute Stock requirements?
    Kuroi Web Design and Development | Twitter

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

  2. #42
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,611
    Plugin Contributions
    25

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

    Quote Originally Posted by bobage24 View Post
    I have installed this mod, but I am not sure if this is normal. I have a size set up for selling shirts. I only have them in size M,L,XL, but my attribute is for all sizes, so it includes S and XXL, XXXL. But I have zero of these in stock, but they are still showing up on the items page. Is this normal? Is there a way to make it so that the items not in stock don't show up as options?

    Thanks,
    Bob
    Hi Bob

    Yes this is normal. The options showing in the product info page are built by core Zen Cart code that doesn't know anything about the stock values maintained by this add-on.

    If you have just one attribute (size) there are other threads that refer to the "Grayson" solution for displaying attribute stock levels on the product_info page. This solution could be tweaked to instead suppress display of the option.
    Kuroi Web Design and Development | Twitter

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

  3. #43
    Join Date
    Oct 2006
    Posts
    5
    Plugin Contributions
    0

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

    Quote Originally Posted by kuroi View Post
    Can you tell me a little more background to what you are trying to do so that I can take it into account for future Attribute Stock requirements?
    I have a mix of products, some of which require stock by attributes (e.g. tea-light holders which come in small, medium and large). But I also sell cushion covers, which I want to be able to sell with or without the cusion. This is more of a stock by raw materials problem, but since I have lots of cushions I was just going to keep track of stock using the total number of cushion covers sold, with or without cushions inside.
    So the product is priced by attribute (with cushion or without), but I want to opt out of keeping track of the stock by attributes.

    Is there any reason that all products with attributes have to be included in stock by attributes? Would it be difficult to add an option to allow products to opt out of tracking stock by attributes?

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

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

    You have an example of what I think of as the "gift wrapping" problem. A situation where one of the attributes of a product refers to something that accompanies the product and has stock that is completely independent of that of the product itself. Ironcially, your attribute goes on the inside, rather than the outside.

    It probably wouldn't be too difficult to extend the mod to cope with this, but there are no plans to do so. The reason for this is that the functionality is due to be incorporated into the next major release of Zen Cart and to push it to the next level will require a complete rewrite (in fact a completely different approach), so any changes made now would have a short life and make migration to the next release more difficult. However, coping with exactly the situation that you describe looms large in my recommendations to the Zen Cart team.
    Kuroi Web Design and Development | Twitter

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

  5. #45
    Join Date
    Aug 2006
    Location
    Kihikihi, New Zealand
    Posts
    230
    Plugin Contributions
    3

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

    Thanks Kuroi, will get a copy today

    Kind regards,

    Goshawk
    Time is but an illusion, there is only "now"!

  6. #46
    Join Date
    Sep 2006
    Posts
    38
    Plugin Contributions
    0

    Default Re: Stock by Attribute v4.3 for Zen Cart 1.3.6

    Quote Originally Posted by kuroi View Post
    Hi Frank. Glad you solved the problem, and thanks for posting the answer. It's always helpful when people do that as Zen Cart now has such a large base that sooner or later somebody else will probably do something similar.

    The Zen Cart 1.3.6 version (mod version 4.3) is now available in the download section. Due to my other commitments it's less extensively tested than previous releases. The changes shouldn't have introduced any new problems, but if you find any please post them.

    I strongly recommend upgrading to this version as it incorporates some of the security changes added to Zen Cart 1.3.6.

    If you are using languages other than English or French, you will need to make some minor adjustments to the language files, otherwise upgrading is simply a matter of overwriting your existing mod files.
    First, a little bug that I found in your new release by using beyond compare with older ones.

    In functions_lookups.php on line 163:
    function zen_get_products_stock($products_id) {
    should've been:
    /* function zen_get_products_stock($products_id) {
    Next, I applied a fix by Grayson posted in archived threads to show qty of attributes on product info page. For those who still having trouble with this fix, I am including the attributes.php file here. You may drop it in includes/modules/your_template/ folder.

    I am also including another alternative version of this fix (I take no credit whatsoever on this), which shows attribute stock after price_fix and weight etc. display, which makes more sense to myself, becasue this way customer won't confuse stock level with quantity discounts/surcharges. This alternative file is called attributes_Alternative.php. You need to rename it to attributes.php to overwrite the existing one when using.

    Don't forget to add a define to the product_info.php in includes/languages/english/your_template folder, such as:
    [quote][define('TEXT_ATTRIBUTES_PIECES','pieces');/QUOTE]. I use 'in stock' instead of 'pieces', for it makes more sense.

    Now, I need help for myself!! I tried hard to set a "display only" option value such as " select from below" to NOT show stock level, which is a conditional undone of the above fix in attributes.php. I tried codes as follows, but no luck:

    /*
    * check if attribute is display only
    */
    global $db;
    $check_attributes = $db->Execute("select *
    from " . TABLE_PRODUCTS_ATTRIBUTES . "
    where products_id = '" . (int)$products_id . "'
    and options_id = '" . (int)$option . "'
    and options_values_id = '" . (int)$value . "'");

    if ($check_attributes->fields['attributes_display_only'] == '1') {
    $products_options_value_id = $products_options->fields['products_options_values_id'];
    $products_options_details = $products_options->fields['products_options_values_name'];
    $products_options_details_noname = $products_options_display_price . ($products_options->fields['products_attributes_weight'] != 0 ? '<br />' . $products_options_display_weight : '');
    }
    This block of codes were applied after the "// prepare product options details" section and before "//radio buttons" section.

    Any help on this would be greatly appreciated!
    Attached Files Attached Files
    Last edited by frank_lyy; 20 Nov 2006 at 11:19 AM.

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

    Default Stock by Attribute v4.3.1 for Zen Cart 1.3.6

    Hi Frank

    I'm not sure whether the bug that you pointed out would have any functional implications, but it's clearly wrong so I've updated the release pack to 4.3.1. Many thanks for pointing it out.

    In respect of the Grayson solution. It clearly works for some people, but comes with the big caveat that it is only suitable for situations where your products have just one attribute (the reason why it has not been incorporated into this or earlier versions of the mod).
    Kuroi Web Design and Development | Twitter

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

  8. #48
    Join Date
    Sep 2006
    Posts
    38
    Plugin Contributions
    0

    Default Re: Stock by Attribute v4.3.1 for Zen Cart 1.3.6

    Quote Originally Posted by kuroi View Post
    Hi Frank

    I'm not sure whether the bug that you pointed out would have any functional implications, but it's clearly wrong so I've updated the release pack to 4.3.1. Many thanks for pointing it out.

    In respect of the Grayson solution. It clearly works for some people, but comes with the big caveat that it is only suitable for situations where your products have just one attribute (the reason why it has not been incorporated into this or earlier versions of the mod).
    You are absloutely right. The Grayson solution is for products which have only one attribute! I have two attributes on one of my products. In order to use Grayson's fix, I combined the two attributes into one, and named it (very clumsy looking) something like "Color + Size Combination". I sincerely hope someone could come up with a better solution on multi-attribute stock control as well as product info display on these attributes in the near future!!!!

    By the way, I solved my own dilemma. I tried to set a "displayonly" attribute as default selection to force attribute selection when add product to cart. Now, I figured out how to set this particular attribute back to NOT showing stock level (for many reasons, but mostly for a better looking). Here is my solution:

    Find attributes.php in includes/modules/your_template floder from Kuroi's contrib( many many thanks to Kuroi! Great mod!). Change this code:
    $products_options_array[] = array('id' => $products_options->fields['products_options_values_id'],
    'text' => $products_options->fields['products_options_values_name']);
    to the following:
    //check if attribute is display only
    if ($products_options->fields['attributes_display_only'] == '1') {
    $products_options_array[] = array('id' => $products_options->fields['products_options_values_id'],
    'text' => $products_options->fields['products_options_values_name']);
    } else {
    $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 . ']');
    }
    Next, right above this line:
    //radio buttons
    add the following:
    //check if attribute is display only
    if ($products_options->fields['attributes_display_only'] == '1') {
    $products_options_value_id = $products_options->fields['products_options_values_id'];
    $products_options_details = $products_options->fields['products_options_values_name'];
    $products_options_details_noname = $products_options_display_price . ($products_options->fields['products_attributes_weight'] != 0 ? '<br />' . $products_options_display_weight : '');
    }
    //check complete
    I wish these changes can be of some help to somebody out there who needs it. I am not a programmer and I've got a lot of help from various smart people in this forum before. For that, I am very grateful.

    "Stock by attributes" should be inculded in future zen-cart releases and hopefully has much more intelligent fuctions by then.

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

    Default Stock by Attribute v4.0 for Zen Cart 1.3.5

    Hi Frank,

    Thanx for your posted fixes... and actually, instead of showing the stock values beside the respective attributes option, I just want to show the 'Out of Stock' remark to only for those attributes that has reach to 0 in quantity BUT no remarks to the one that still have stock. So that next time the online shoppers no need to 'choose' and 'add to cart' the attributes and then find that no stock available to order!!! Do you have any idea how to code that?! or anyone out there?!
    Last edited by tajul_ashyqin; 21 Nov 2006 at 09:09 AM.
    [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]

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

    Default Stock by Attribute v4.0 for Zen Cart 1.3.5

    Kuroi,

    Is it possible to implement a SEARCH facility to Stocks by Attributes mod?! As what I can see now is that when you have a LOT of stocks with attributes to manage, it become paintful just to search for particular products thru the listing
    [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 5 of 321 FirstFirst ... 345671555105 ... LastLast

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