Page 64 of 113 FirstFirst ... 1454626364656674 ... LastLast
Results 631 to 640 of 1125
  1. #631
    Join Date
    Sep 2008
    Posts
    22
    Plugin Contributions
    0

    Default Re: Stocks by attributes

    Quote Originally Posted by karimm View Post
    Would it also be possible to add the text sold out to the dropdown list, when the stock is 0 ?
    I tried the following changes in attributes.php and appears to get you part of what you want.

    removed the following line:
    and (pwas.quantity > 0 or pwas.quantity IS NULL)

    Altered the else where setting the text output.
    else
    {
    if($products_options->fields['quantity'] == 0) {$products_text_to_use = $products_options->fields['products_options_values_name'] . " (Sold Out)";} //improperly hard coded
    else {$products_text_to_use = $products_options->fields['products_options_values_name'];}
    }


    Quote Originally Posted by karimm View Post
    and if the customer selects a sold out product he/she will not get the checkout button of instead of the button the text wil appear that that option is unavaible !
    Everything is possible, but this is beyond my ability. I would think this might need to be some JavaScript coding or something else browser side.

  2. #632
    Join Date
    Nov 2008
    Posts
    53
    Plugin Contributions
    0

    Default Re: Stocks by attributes

    Thanks, works great !!!

  3. #633
    Join Date
    Jan 2005
    Location
    NY
    Posts
    149
    Plugin Contributions
    0

    Default Re: Stocks by attributes

    I posted this question a few months back and never got a solution, and have seen other people post similar questions.

    I have a clothing store that has items with size, and an optional monogram text box.

    When I try to add a variant I am presented with 2 dropdown boxes as expected. I choose the size I want and choose ALL for my monogram attribute. Since the only option under monogram is TEXT the item appears out of stock unless someone puts text in the box.

    I was thinking of the idea of adding some text in the box by default, like "none", but the monogram attribute adds an additional $10 to the cost of the item. I really need to be able to set stock independent of the monogram attribute. Is there a way to ignore a certain attribute, or in my case I would like to be able to ignore all text attributes in the stock.

    Can anyone help me?

  4. #634
    Join Date
    Sep 2008
    Posts
    22
    Plugin Contributions
    0

    Default Re: Stocks by attributes

    Quote Originally Posted by pjb923 View Post
    When I try to add a variant I am presented with 2 dropdown boxes as expected. I choose the size I want and choose ALL for my monogram attribute. Since the only option under monogram is TEXT the item appears out of stock unless someone puts text in the box.
    ...
    Can anyone help me?
    1. Are you using "Products with Attributes Stock"?

    If yes then sounds similar to my issue on wanting only one selection effecting stock. Read my responses a few post ago you'll I note that had similar issues when a product has multiple "option names" applied.

    If no then not understanding question.

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

    Default Re: Stocks by attributes

    @pjb923

    You may be able to implement a hack similar to that done by yellow1912, but in this case to suppress the text attribute from being affected by stock by attribute.
    Kuroi Web Design and Development | Twitter

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

  6. #636
    Join Date
    Dec 2008
    Posts
    79
    Plugin Contributions
    0

    Default Re: Stocks by attributes

    Quote Originally Posted by karimm View Post
    Hello Kellan,

    Were does this peace of code have to go, were do i put it ?

    regards,
    I have changed my includes/modules/attributes.php file. Here is the code changes I have made. If you search the if line you should be able to locate it in your code.


    This is around line 119 in my code
    Code:
    if($products_options->fields['quantity'])
    					{
    						$products_text_to_use = $products_options->fields['products_options_values_name'] . ' ' . TEXT_ATTRIBUTES_PIECES_OPEN . $products_options->fields['quantity'] . ' ' . TEXT_ATTRIBUTES_PIECES . TEXT_ATTRIBUTES_PIECES_CLOSE . ' ';
    					}

    This is around line 208 in my code
    Code:
    if ($products_options_names->fields['products_options_type'] != PRODUCTS_OPTIONS_TYPE_TEXT and $products_options_names->fields['products_options_type'] != PRODUCTS_OPTIONS_TYPE_FILE) {
    //       $products_options_details = $products_options->fields['products_options_values_name'];
    // gbm - replaced original line above to display attribute stock amount beside attribute
    			
           		$products_options_details = $products_options->fields['products_options_values_name'] . ' ' . TEXT_ATTRIBUTES_PIECES_OPEN . $products_options->fields['quantity'] . ' '. TEXT_ATTRIBUTES_PIECES . TEXT_ATTRIBUTES_PIECES_CLOSE . ' ';
          		
    	  	}
    This is around line 218 in my code
    Code:
    if ($products_options_names->fields['products_options_images_style'] >= 3) {
           		$products_options_details .= $products_options_display_price . ($products_options->fields['products_attributes_weight'] != 0 ? '<br />' . $products_options_display_weight : '');
    //       $products_options_details_noname = $products_options_display_price . ($products_options->fields['products_attributes_weight'] != 0 ? '<br />' . $products_options_display_weight : '');
    // gbm - replaced original line above to display attribute stock amount beside attribute
           		$products_options_details_noname = ' '. TEXT_ATTRIBUTES_PIECES_OPEN . $products_options->fields['quantity'] . ' '. TEXT_ATTRIBUTES_PIECES . TEXT_ATTRIBUTES_PIECES_CLOSE . ' ' . $products_options_display_price . ($products_options->fields['products_attributes_weight'] != 0 ? '<br />' . $products_options_display_weight : '');
          	} else {
           		$products_options_details .= $products_options_display_price . ($products_options->fields['products_attributes_weight'] != 0 ? '' . $products_options_display_weight : '');
    //       $products_options_details_noname = $products_options_display_price . ($products_options->fields['products_attributes_weight'] != 0 ? '' . $products_options_display_weight : '');
    // gbm - replaced original line above to display attribute stock amount beside attribute
           		$products_options_details_noname = ' ' . TEXT_ATTRIBUTES_PIECES_OPEN . $products_options->fields['quantity'] . ' '. TEXT_ATTRIBUTES_PIECES . TEXT_ATTRIBUTES_PIECES_CLOSE . ' ' . $products_options_display_price . ($products_options->fields['products_attributes_weight'] != 0 ? '' . $products_options_display_weight : '');
          	}
         }


    I also have changed the language file for product_info.php to define the following

    Code:
    define('TEXT_ATTRIBUTES_PIECES','Available');
    define('TEXT_ATTRIBUTES_PIECES_OPEN','(');
    define('TEXT_ATTRIBUTES_PIECES_CLOSE',')');
    This changes 'pieces' to 'Available'.
    This also will allow me to change the grouping symbols in one place for all of what were hard coded '[' before. In case the customer doesn't like the brackets.

    Hope this helps.

  7. #637
    Join Date
    Jan 2009
    Posts
    2,123
    Plugin Contributions
    0

    Default Re: Stocks by attributes

    Hi All.

    At the moment, I am using a similar mod to this called "stock_by_attributes_4-7MULTIADD"

    This is working well apart from one little niggle.... when an attribute reaches QTY=0, it is still displayed in the drop down menu.

    My question is whether or not this mod "stockattribute_by_danielcor_3-01-1" has a setting that would tell the drop down to HIDE attributes with stock level QTY=0 ??

    If it's possible then I'd definitely change over because at present I need to manually delete each attribute when it reaches zero... very annoying...

    I'm also running the dynamic dropdown mod which is supposed to help here but does not seem to work at all.

    Any help/advice would be vastly appreciated.

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

    Default Re: Stocks by attributes

    @limelites

    There is no benefit whatsoever in going back to Danielcor's version 3.

    The version 4 series of Stock by Attribute was built by taking that older version, adding some functionality and fixing a heap of minor bugs. You won't find anything in there that's not in version 4, though I can't speak specifically about MULTIADD as I've not used that, but I doubt that any functionality was removed when that release was built.
    Kuroi Web Design and Development | Twitter

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

  9. #639
    Join Date
    Jan 2009
    Posts
    2,123
    Plugin Contributions
    0

    Default Re: Stocks by attributes

    OK, point taken.

    I don't suppose you know how to make an attribute with QTY=0 disappear from the drop down list of attributes?

  10. #640
    Join Date
    Dec 2008
    Posts
    79
    Plugin Contributions
    0

    Default Re: Stocks by attributes

    Quote Originally Posted by limelites View Post
    OK, point taken.

    I don't suppose you know how to make an attribute with QTY=0 disappear from the drop down list of attributes?
    several of us have modified it to different versions of what you are looking for. This post should help you:

    http://www.zen-cart.com/forum/showpo...&postcount=559


    You also may want to look at page 56 and 57 as I believe this is where it is discussed.

    Hope that helps.

 

 
Page 64 of 113 FirstFirst ... 1454626364656674 ... 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