Page 1 of 2 12 LastLast
Results 1 to 10 of 3609

Hybrid View

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

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

    I have a version for 1.3.6 but haven't had time to test it yet. Apologies to others who have asked questions, I will be back to answer them when pressure of work permits, in the meamtime, hopefully other members of the community can help.
    Kuroi Web Design and Development | Twitter

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

  2. #2
    Join Date
    Apr 2006
    Posts
    72
    Plugin Contributions
    0

    red flag How do I disable this mod?

    I installed the mod and it seems to work as promised. Nice job. However, my client apparently does not want to deal with adjusting stock levels for every variation of product. Is there a way to disable this and go back to the old way?

    Is there a switch or do I need to copy over some "new" files with original ones?

    Thanks,

    Chris

  3. #3
    Join Date
    Apr 2006
    Posts
    72
    Plugin Contributions
    0

    application error Removal of Stock by Attribute v4.0 causing FATAL ERRORS!

    Anyone???

    I replaced all the overwritten files with the original, but am now getting the following error after checkout from the shopping cart:


    Fatal error: Cannot redeclare class httpclient in /home/chubby/public_html/shop/includes/classes/http_client.php on line 22


    I gotta launch this thing in the next coupla days. Any help is appreciated.

    Chris

  4. #4
    Join Date
    Apr 2006
    Posts
    72
    Plugin Contributions
    0

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

    My fix for this (rather, a workaround) was that I had to KEEP the changed version of header_php.php in the modules/pages/checkout_shipping. The original version of the file was causing the error for some reason.

    Anyway, it works and attribute stock is not required. I basically deleted and replaced all the changed files with originals (excepting above) and deleted the new database entries/tables.



    PL

  5. #5
    Join Date
    Sep 2006
    Posts
    38
    Plugin Contributions
    0

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

    Quote Originally Posted by kuroi View Post
    I have a version for 1.3.6 but haven't had time to test it yet. Apologies to others who have asked questions, I will be back to answer them when pressure of work permits, in the meamtime, hopefully other members of the community can help.
    I hope that you release your version for 1.3.6 soon. When I installed stock by attribute on 1.3.6, I encountered a minor bug. When you try to change Configuration>'show stock when low', there is a error message:
    Parse error: parse error, unexpected T_STRING, expecting ')' in /home/user/public_html/admin/configuration.php(192) : eval()'d code on line 1
    So I just left this field unchanged. Anyway, I think this is just a minor bug and the problem probably came from admin/products_with_attributes_stock.php

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

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

    Quote Originally Posted by frank_lyy View Post
    I hope that you release your version for 1.3.6 soon. When I installed stock by attribute on 1.3.6, I encountered a minor bug. When you try to change Configuration>'show stock when low', there is a error message:

    So I just left this field unchanged. Anyway, I think this is just a minor bug and the problem probably came from admin/products_with_attributes_stock.php
    Problem solved!! Sorry, my mistake. The problem was cause by myself. I changed stock_attribute sql syntax when installing the first time in light of my past experience with contribs installations such as super order 2.0.

    Now, I simply reinstalled the stock_attribute.sql as it is. Problem solved.

    It seems like this contrib is working with 1.3.6 so far.

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

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

    Quote Originally Posted by frank_lyy View Post
    Problem solved!! Sorry, my mistake. The problem was cause by myself. I changed stock_attribute sql syntax when installing the first time in light of my past experience with contribs installations such as super order 2.0.

    Now, I simply reinstalled the stock_attribute.sql as it is. Problem solved.

    It seems like this contrib is working with 1.3.6 so far.
    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.
    Kuroi Web Design and Development | Twitter

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

  8. #8
    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.

  9. #9
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    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)

  10. #10
    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.

 

 
Page 1 of 2 12 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

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