Zen Cart Logo
Forums / All Other Contributions/Addons / Stocks by attributes

Stocks by attributes

Locked

Views: 251,296

Results 621 to 640 of 1,126
This thread is locked. New replies are disabled.
3 Mar 2009, 5:43 PM
#621
s58smith avatar

s58smith

New Zenner

Join Date:
Sep 2008
Posts:
22
Plugin Contributions:
0

Stocks by attributes

You can either comment out the old and paste in the new or you can just replace. Here are the changes you make.

Copy modules/attributes.php into modules/(your template)/attributes.php

Make the following two changes to the page.

Around line 75 change sql. I commented out original and put new below so you could see both. You can just replace the original with the new if you like.

                /*
                $sql = "select    pov.products_options_values_id,
                        pov.products_options_values_name,
                        pa.*
              from      " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov
              where     pa.products_id = '" . (int)$_GET['products_id'] . "'
              and       pa.options_id = '" . (int)$products_options_names->fields['products_options_id'] . "'
              and       pa.options_values_id = pov.products_options_values_id
              and       pov.language_id = '" . (int)$_SESSION['languages_id'] . "' " .
                $order_by;
                */
                $sql = "select  pov.products_options_values_id,
                        pov.products_options_values_name,
                        pa.*,
                        pwas.*
              from      " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov, " . TABLE_PRODUCTS_ATTRIBUTES . " pa LEFT JOIN " . TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK . " pwas ON pwas.stock_attributes = pa.products_attributes_id
              where     pa.products_id = '" . (int)$_GET['products_id'] . "'
              and       pa.options_id = '" . (int)$products_options_names->fields['products_options_id'] . "'
              and       (pwas.quantity > 0 or pwas.quantity IS NULL)
              and       pa.options_values_id = pov.products_options_values_id
              and       pov.language_id = '" . (int)$_SESSION['languages_id'] . "' " .
                $order_by;

Around line 105 change the statement you found. Again original in comment above and new below.

/*
                  $products_options_array[] = array('id' => $products_options->fields['products_options_values_id'],
                  'text' => $products_options->fields['products_options_values_name']);
*/
                  if($products_options->fields['quantity'])
                  {
                    $products_text_to_use = $products_options->fields['products_options_values_name'] . " (" .  $products_options->fields['quantity'] . " Available)"; //yes Available is improperly hard coded 
                  } 
                  else 
                  {
                    $products_text_to_use = $products_options->fields['products_options_values_name'];
                  }
                  $products_options_array[] = array('id' => $products_options->fields['products_options_values_id'],
                                                    'text' => $products_text_to_use);

Now I didn't find this mentioned by anyone else, but I'll give you a heads up. If you plan on having multiple attribute names (not values under a single name) on a product, but only one attribute name will be controlling the quantity you need to do the following or won't display.

  1. Add the attributes controlling quantity first.
  2. Go into Products with Attributes Stock and setup stock. IMPORTANT Do this even on attributes that have no stock presently, but you may add later.
  3. Now go back and add the additional attribute names/values to the product. add those attributes first and then set the quantity.

Hope you enjoy it. Worked well for me.

3 Mar 2009, 5:52 PM
#622
s58smith avatar

s58smith

New Zenner

Join Date:
Sep 2008
Posts:
22
Plugin Contributions:
0

Re: Stocks by attributes

Corrections to my test below.

s58smith:

  1. Now go back and add the additional attribute names/values to the product. add those attributes first and then set the quantity.
  1. Add the attributes controlling quantity first.
  2. Go into Products with Attributes Stock and setup stock. IMPORTANT Do this even on attribute values that have no stock presently, set to 0, but you may add later.
  3. Now go back and add the additional attribute names/values to the product.

Example:
Is having some attributes that are "read only" to give additional information about a product. But they don't effect overall quantity. If you attach two attribute names to a product when you go to build the quantity with attributes by stock it will build a cross table of multiple values and the code above won't work.

3 Mar 2009, 9:01 PM
#623
karimm avatar

karimm

New Zenner

Join Date:
Nov 2008
Posts:
53
Plugin Contributions:
0

Re: Stocks by attributes

:bigups: thanks alot for you help, it works like a charm.

3 Mar 2009, 11:18 PM
#624
galax avatar

galax

New Zenner

Join Date:
Jan 2009
Posts:
6
Plugin Contributions:
0

Re: Stocks by attributes

s58smith:

You can either comment out the old and paste in the new or you can just replace. Here are the changes you make.

Copy modules/attributes.php into modules/(your template)/attributes.php

Make the following two changes to the page.

Around line 75 change sql. I commented out original and put new below so you could see both. You can just replace the original with the new if you like.

            /*
            $sql = "select    pov.products_options_values_id,
                    pov.products_options_values_name,
                    pa.*
          from      " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov
          where     pa.products_id = '" . (int)$_GET['products_id'] . "'
          and       pa.options_id = '" . (int)$products_options_names->fields['products_options_id'] . "'
          and       pa.options_values_id = pov.products_options_values_id
          and       pov.language_id = '" . (int)$_SESSION['languages_id'] . "' " .
            $order_by;
            */
            $sql = "select  pov.products_options_values_id,
                    pov.products_options_values_name,
                    pa.*,
                    pwas.*
          from      " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov, " . TABLE_PRODUCTS_ATTRIBUTES . " pa LEFT JOIN " . TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK . " pwas ON pwas.stock_attributes = pa.products_attributes_id
          where     pa.products_id = '" . (int)$_GET['products_id'] . "'
          and       pa.options_id = '" . (int)$products_options_names->fields['products_options_id'] . "'
          and       (pwas.quantity > 0 or pwas.quantity IS NULL)
          and       pa.options_values_id = pov.products_options_values_id
          and       pov.language_id = '" . (int)$_SESSION['languages_id'] . "' " .
            $order_by;
> 
> Around line 105 change the statement you found. Again original in comment above and new below.  
> ```
/*
                  $products_options_array[] = array('id' => $products_options->fields['products_options_values_id'],
                  'text' => $products_options->fields['products_options_values_name']);
*/
                  if($products_options->fields['quantity'])
                  {
                    $products_text_to_use = $products_options->fields['products_options_values_name'] . " (" .  $products_options->fields['quantity'] . " Available)"; //yes Available is improperly hard coded 
                  } 
                  else 
                  {
                    $products_text_to_use = $products_options->fields['products_options_values_name'];
                  }
                  $products_options_array[] = array('id' => $products_options->fields['products_options_values_id'],
                                                    'text' => $products_text_to_use);

Now I didn't find this mentioned by anyone else, but I'll give you a heads up. If you plan on having multiple attribute names (not values under a single name) on a product, but only one attribute name will be controlling the quantity you need to do the following or won't display.

  1. Add the attributes controlling quantity first.
  2. Go into Products with Attributes Stock and setup stock. IMPORTANT Do this even on attributes that have no stock presently, but you may add later.
  3. Now go back and add the additional attribute names/values to the product. add those attributes first and then set the quantity.

Hope you enjoy it. Worked well for me.
I'd also like to have this work, but when I replaced the code as shown in this post, just a blank page was displayed. I already have "Stock by attribute 4-7 multiadd installed" How do I go about it? (My shop is at http://littleandlovely.com) if you'd like to see.

4 Mar 2009, 7:28 AM
#625
s58smith avatar

s58smith

New Zenner

Join Date:
Sep 2008
Posts:
22
Plugin Contributions:
0

Re: Stocks by attributes

Galax:

I'd also like to have this work, but when I replaced the code as shown in this post, just a blank page was displayed. I already have "Stock by attribute 4-7 multiadd installed" How do I go about it? (My shop is at http://littleandlovely.com) if you'd like to see.

Looked at your site and I have one question. Are you doing a multi attribute quanity?
For example on this page http://litenoglekker.no/index.php?main_page=product_info&cPath=14&products_id=18 does size 0/brown have a quantity and size 1/brown a different quantity? If this is yes then the changes you are copy into attributes.php are not going to work for you.

The changes only work when a single option name. In the category page http://litenoglekker.no/index.php?main_page=index&cPath=20_23 if this was actually a product page and the color was a single option name selection then the changes would work.

You can see my first sample page at http://www.pot-gardens.com/catalog/index.php?main_page=product_info&cPath=1_11&products_id=3. The drop down works as only one option name is associated to quantity. (Just be nice as I'm just starting on this site.)

4 Mar 2009, 11:28 AM
#626
karimm avatar

karimm

New Zenner

Join Date:
Nov 2008
Posts:
53
Plugin Contributions:
0

Re: Stocks by attributes

Would it also be possible to add the text sold out to the dropdown list, when the stock is 0 ? 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 !

5 Mar 2009, 7:50 AM
#627
s58smith avatar

s58smith

New Zenner

Join Date:
Sep 2008
Posts:
22
Plugin Contributions:
0

Re: Stocks by attributes

karimm:

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'];}
}

karimm:

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.

5 Mar 2009, 4:27 PM
#628
karimm avatar

karimm

New Zenner

Join Date:
Nov 2008
Posts:
53
Plugin Contributions:
0

Re: Stocks by attributes

Thanks, works great !!! :clap:

5 Mar 2009, 6:30 PM
#629
pjb923 avatar

pjb923

Zen Follower

Join Date:
Jan 2005
Location:
NY
Posts:
135
Plugin Contributions:
0

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?

5 Mar 2009, 6:54 PM
#630
s58smith avatar

s58smith

New Zenner

Join Date:
Sep 2008
Posts:
22
Plugin Contributions:
0

Re: Stocks by attributes

pjb923:

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 Mar 2009, 7:20 PM
#631
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

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.

7 Mar 2009, 5:38 PM
#632
kellan4459 avatar

kellan4459

New Zenner

Join Date:
Dec 2008
Posts:
79
Plugin Contributions:
0

Re: Stocks by attributes

karimm:

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

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

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

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

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.

9 Mar 2009, 10:25 AM
#633
limelites avatar

limelites

Totally Zenned

Join Date:
Jan 2009
Posts:
2,085
Plugin Contributions:
0

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.

9 Mar 2009, 10:43 AM
#634
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

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.

9 Mar 2009, 11:13 AM
#635
limelites avatar

limelites

Totally Zenned

Join Date:
Jan 2009
Posts:
2,085
Plugin Contributions:
0

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 Mar 2009, 3:35 AM
#636
kellan4459 avatar

kellan4459

New Zenner

Join Date:
Dec 2008
Posts:
79
Plugin Contributions:
0

Re: Stocks by attributes

limelites:

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/showpost.php?p=682070&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.

10 Mar 2009, 1:49 PM
#637
limelites avatar

limelites

Totally Zenned

Join Date:
Jan 2009
Posts:
2,085
Plugin Contributions:
0

Re: Stocks by attributes

kellan4459:

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/showpost.php?p=682070&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.

Hi Kellan, thanks for that link, it was very, very useful... when I go to ADMIN>CATALOG>PRODUCTS WITH ATTRIBUTES STOCK and change an attribute quantity to '0' then it does indeed disappear from the drop down menu now. So customers should no longer have the option of selecting out of stock sizes..... if only for this problem here :-

Let me try and explain what the problem is exactly.... When someone buys something from my shop, then I go to ADMIN>CATALOG>PRODUCTS WITH ATTRIBUTES STOCK it seems to be mis-counting........

Here, a picture paints a thousand words:

As you can see, the total QTY after someone buys an item does change, however, the attribute QTY does not.... What baffles me is why PRODUCTS WITH ATTRIBUTES STOCK is not adding the Quantity in Stock Column to arrive at the total QTY?????

Anyone know why it's doing this??

For example, in the pics above someone bought the size 12 in both items... it deducted it from the total quantity but did not deduct it from the size 12 attribute quantity... I'm bamboozled by this... If it would only deduct from the attribute qty then the site would be functioning 100% perfectly..

10 Mar 2009, 4:51 PM
#638
limelites avatar

limelites

Totally Zenned

Join Date:
Jan 2009
Posts:
2,085
Plugin Contributions:
0

Re: Stocks by attributes

Ahaaaaaaa, figured this one out guys!!

For anyone else having a problem with this issue, just look at re-installing the files that shipped with the stock_by_attributes mod.

I've just cured my problems by overwriting /includes/classes/order.php with the order.php from "stock_by_attributes_4-7MULTIADD mod"

Somehow some other mod had corrupted the data that updates the "Quantity in Stock" in ADMIN>CATALOG>PRODUCTS WITH ATTRIBUTES".

It is now updating the Quantity in Stock Column with each sale. All working perfectly now.

Additionally, if you want the attribute in the drop down menu to automatically disable when the attribute quantity = zero, then you have to open /includes/modules/attributes.php and replace this:

$sql = "select    pov.products_options_values_id,
                        pov.products_options_values_name,
                        pa.*
              from      " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov
              where     pa.products_id = '" . (int)$_GET['products_id'] . "'
              and       pa.options_id = '" . (int)$products_options_names->fields['products_options_id'] . "'
              and       pa.options_values_id = pov.products_options_values_id
              and       pov.language_id = '" . (int)$_SESSION['languages_id'] . "' " .
                $order_by;

with this:

$sql=	"SELECT  pov.products_options_values_id,
       					 pov.products_options_values_name,
       					 pa.*,
       					 pwas.*
        	    FROM   " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov, " . TABLE_PRODUCTS_ATTRIBUTES . " pa LEFT JOIN " . TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK . " pwas ON pwas.stock_attributes = pa.products_attributes_id
                WHERE   pa.products_id = '" . (int)$_GET['products_id'] . "'
       			and    pa.options_id = '" . (int)$products_options_names->fields['products_options_id'] . "'
				and    (pwas.quantity > 0 or pwas.quantity IS NULL)
      			and    pa.options_values_id = pov.products_options_values_id
             	and       pov.language_id = '" . (int)$_SESSION['languages_id'] . "' " .
				$order_by;
10 Mar 2009, 8:29 PM
#639
karimm avatar

karimm

New Zenner

Join Date:
Nov 2008
Posts:
53
Plugin Contributions:
0

Re: Stocks by attributes

kellan4459:

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

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
> ```
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

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
> 
> ```
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.

Thanks for upgrade :flex: , it now works language independend.

I currently use a a addition that show the soldout attrib with the text sold out or availble.
I think it would be great if someone could integrade this upgrade in the admin panel. So you can choose to not show the attrib or show it with a specified text !! that would realy complete this modification. That's for your help !! :smile:

11 Mar 2009, 3:53 AM
#640
kellan4459 avatar

kellan4459

New Zenner

Join Date:
Dec 2008
Posts:
79
Plugin Contributions:
0

Re: Stocks by attributes

Glad you both got it working.