-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
I made the change and It looks like I can work with that.
http://www.nothingbutcostumes.com/fi...e-p-15662.html
Do you know where I can find the TXT string that says Qty?
I want to change it to Available Stock Qty
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
milobloom
You will find it in the file at:
includes\languages\english\extra_definitions\products_with_attributes.php
I noticed your shopping cart checkout page has incorrect info related to availability, the TEST2 mod I gave you a link to should fix that.
Let me know if you were able to get the test mod and your tests results. Thanks
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
milobloom
Can I hide the attribute value if stock is Zero instead of saying it is out of stock?
If I understand your question correctly, You can hide the Out of Stock Message, by going to admin>Configuration>Stock>Check stock level ,and set it to False!
That stops the display of Out of Stock Message.
I hope it helps.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
I had a version from January but can't find a guide text if I need to run the full upgrade / install script in case I upgrade from the Jan 3 version to this latest version of 1.5.1.2. Atleast the upgrade script runs to a warning:
WARNING: An Error occurred, please refresh the page and try again.
The error log has this "FATAL ERROR":
PHP Fatal error: 1146:Table 'customer123_ws.products_with_attributes_stock' doesn't exist :: UPDATE products_with_attributes_stock SET quantity = '3' WHERE products_with_attributes_stock.stock_id =263 LIMIT 1 in /home/customer123/public_html/shop/includes/classes/db/mysql/query_factory.php on line 120
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
ADDITIONALLY comes also an error:
PHP Fatal error: 1146: Table 'customer123_ws.zen_products_with_attributes_stock' doesn't exist :: SELECT pas.stock_id, COUNT(pas.stock_id) AS stockCount
FROM zen_products_with_attributes_stock pas
GROUP BY pas.products_id, pas.stock_attributes
HAVING stockCount > 1 in /home/customer123/public_html/kauppa/includes/classes/db/mysql/query_factory.php on line 120
so, it seems it doesn't understand that there is a PREFIX used in our webshop. How to fix that?
There is no "out of stock" or "stock saldo" visible on the product info page even if set up in configuration so.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
ellivir
I had a version from January but can't find a guide text if I need to run the full upgrade / install script in case I upgrade from the Jan 3 version to this latest version of 1.5.1.2. Atleast the upgrade script runs to a warning:
WARNING: An Error occurred, please refresh the page and try again.
The error log has this "FATAL ERROR":
PHP Fatal error: 1146:Table 'customer123_ws.products_with_attributes_stock' doesn't exist :: UPDATE products_with_attributes_stock SET quantity = '3' WHERE products_with_attributes_stock.stock_id =263 LIMIT 1 in /home/customer123/public_html/shop/includes/classes/db/mysql/query_factory.php on line 120
Where did you get version 1.5.1.2 from?
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
ellivir
I had a version from January but can't find a guide text if I need to run the full upgrade / install script in case I upgrade from the Jan 3 version to this latest version of 1.5.1.2. Atleast the upgrade script runs to a warning:
WARNING: An Error occurred, please refresh the page and try again.
The error log has this "FATAL ERROR":
PHP Fatal error: 1146:Table 'customer123_ws.products_with_attributes_stock' doesn't exist :: UPDATE products_with_attributes_stock SET quantity = '3' WHERE products_with_attributes_stock.stock_id =263 LIMIT 1 in /home/customer123/public_html/shop/includes/classes/db/mysql/query_factory.php on line 120
It seems that Stock by Attributes has been released.
Make sure you are not trying to upgrade from 1.4.XX on Zen Cart 1.3.X.
Are you installing this mod on Zen Cart 1.5.1?
Have you installed any other versions of this mod on your cart? If yes, which version?
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
ellivir
ADDITIONALLY comes also an error:
so, it seems it doesn't understand that there is a PREFIX used in our webshop. How to fix that?
There is no "out of stock" or "stock saldo" visible on the product info page even if set up in configuration so.
You were correct, There was one instance (line 293) that was missing the database table prefix. The attached file is corrected, and will be included in the next version. Attachment 13088
Thank you.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
ellivir
I had a version from January but can't find a guide text if I need to run the full upgrade / install script in case I upgrade from the Jan 3 version to this latest version of 1.5.1.2. Atleast the upgrade script runs to a warning:
WARNING: An Error occurred, please refresh the page and try again.
The error log has this "FATAL ERROR":
PHP Fatal error: 1146:Table 'customer123_ws.products_with_attributes_stock' doesn't exist :: UPDATE products_with_attributes_stock SET quantity = '3' WHERE products_with_attributes_stock.stock_id =263 LIMIT 1 in /home/customer123/public_html/shop/includes/classes/db/mysql/query_factory.php on line 120
Hi,
I was wondering if the updated file I provided on the forum corrected your install errors.
Thanks.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
HI, is it possible to do a 'bulk' or 'batch' action to "Add Quantity For Product Variant" on all products at once?
My problem see, is that I seem to have to mouse-click on "Add Quantity For Product Variant" for each product, then select ALL and the add Quantity to create the Stock ID.
I'd like to be able to Add "Quantity For Product Variant" on all products that have attributes at once. As I have 2000+ products, all with the same 15 attributes. And it is taking some time to do this individually, product by product, just to create the 'Stock ID'
All help appreciated, thanks
:(
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
I would say using phpmyadmin you should be able to do this. There would be a query you could run that will populate all the fields with 15 or whatever stock level you want. Im not sure what the query would need to be exactly though.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
ray-the-otter
HI, is it possible to do a 'bulk' or 'batch' action to "Add Quantity For Product Variant" on all products at once?
My problem see, is that I seem to have to mouse-click on "Add Quantity For Product Variant" for each product, then select ALL and the add Quantity to create the Stock ID.
I'd like to be able to Add "Quantity For Product Variant" on all products that have attributes at once. As I have 2000+ products, all with the same 15 attributes. And it is taking some time to do this individually, product by product, just to create the 'Stock ID'
All help appreciated, thanks
:(
This depends on what version of the mod you are running.
If you are using the version 1.5.1.2, than this functionality is built into the installation script as a selection.
After installation you can use the "Run Optional SQL", This script will Makes entries into the new SBA Table based on the products that have attributes associated.
After running the script you can do an export 'Export Table Data' of the table to a CSV file and update the stock using excel (save file as CSV), use "Import Table Data'... This is explained in the documentation under Optional SQL:
Optional.sql
The Optional SQL script is intended to initially fill the stock table with the same quantity that the product has. The script only creates entries for products that have associated attributes.
The first time the script is run on a clean new installation (the new SBA stock table is empty), then all found records are added.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
I'm having a problem that I can't find reference to on this thread.
When I have a product with attributes and stock for each attribute a customer can choose to order whichever version they want. However when they check out, stock is removed from the overall stock levels for the product, but not for the particular attribute.
For example, if I have product A with variants Ab and Ac, and I start with stock of 10 each. A customer purchases 5 in variant Ac; my stock for product A now says 15, but Ab shows as 10, and Ac shows as ten. Worse (which has happened) a customer buys all of Ac, but then the next customer can still choose to buy 10 more that don't exist.
I am using V1.5.0, SBA version 1.5.0, however I was having the same issue with an earlier SBA which I uninstalled over the summer and re-installed just recently. I merged all of the files needed, and everything else seems to work.
Any ideas on where to even start looking?
Thanks.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
NWCider
I'm having a problem that I can't find reference to on this thread.
...
Any ideas on where to even start looking?
Thanks.
Hi,
The code that should be doing this is in: includes\classes\order.php on about line 739, with the title:
// kuroi: Begin Stock by Attributes additions
// added to update quantities of products with attributes
I was not aware this did not work correctly.
This is an area of the code I have not looked closely at yet. If you solve the problem, would you let us know, I am working on an updated version of this mode to include some additional features, and could add that fix.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
In my case it works fine.
I have Product A with 3 attributes.
Prod A, Attribute A (9 QTY)
Prod A, Attribute B (3 QTY)
Prod A, Attribute C (1 QTY)
Displaying 13 Units in Stock
When I checkout one (purchase) from Prod A, Attribute B. After checkout, product_info page displays:
Prod A, Attribute A (9 QTY)
Prod A, Attribute B (2 QTY)
Prod A, Attribute C (1 QTY)
Displaying 12 Units in Stock
It works fine for me.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Tried another test. Checked out 5 of units of Prod A, Attribute A
Prod A
Attribute A (4 QTY)
Attribute B (2 QTY)
Attribute C (1 QTY)
Displaying 7 Units in Stock
Code works fine here.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Thanks for the ideas. The file you referenced was replaced in the install, so it should be fresh. Here is the code in that section, it all looks good to me, but I'm not an advanced code reader...
I also re-checked my stock config settings and everything seems to be correct.
// kuroi: Begin Stock by Attributes additions
// added to update quantities of products with attributes
$attribute_search = array();
$attribute_stock_left = STOCK_REORDER_LEVEL + 1; // kuroi: prevent false low stock triggers
if(isset($this->products[$i]['attributes']) and sizeof($this->products[$i]['attributes']) >0){
foreach($this->products[$i]['attributes'] as $attributes){
$attribute_search[] = $attributes['value_id'];
}
if(sizeof($attribute_search) > 1){
$attribute_search = 'where options_values_id in ("'.implode('","', $attribute_search).'")';
} else {
$attribute_search = 'where options_values_id="' . $attribute_search[0].'"';
}
$query = 'select products_attributes_id from ' . TABLE_PRODUCTS_ATTRIBUTES . ' ' . $attribute_search .' and products_id="' . zen_get_prid($this->products[$i]['id']) . '" order by products_attributes_id';
$attributes = $db->Execute($query);
$stock_attributes_search = array();
while(!$attributes->EOF){
$stock_attributes_search[] = $attributes->fields['products_attributes_id'];
$attributes->MoveNext();
}
if(sizeof($stock_attributes_search) > 1){
$stock_attributes_search = implode(',', $stock_attributes_search);
} else {
foreach($stock_attributes_search as $attribute_search){
$stock_attributes_search1 = $attribute_search;
}
$stock_attributes_search = $stock_attributes_search1;
}
$get_quantity_query = 'select quantity from ' . TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK . ' where products_id="' . zen_get_prid($this->products[$i]['id']) . '" and stock_attributes="' . $stock_attributes_search . '"';
$attribute_stock_available = $db->Execute($get_quantity_query);
$attribute_stock_left = $attribute_stock_available->fields['quantity'] - $this->products[$i]['qty'];
$attribute_update_query = 'update ' . TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK . ' set quantity='.$attribute_stock_left.' where products_id="' . zen_get_prid($this->products[$i]['id']) . '" and stock_attributes="' . $stock_attributes_search . '"';
$db->Execute($attribute_update_query);
}
// kuroi: End Stock by Attribute additions
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
NWCider
I solved this issue on my 1.5.1 cart on a Linux server...and it was addressed in the other thread. I'll try and refresh my memory of it and post.
SBA for 1.5.x http://www.zen-cart.com/showthread.p...-5-0%29/page32
In the mean time, I'm wondering why updates to this mod are here for zencart version 1.5.x?
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
NWCider - just to follow up, especially if you are new to SBA and 1.5.1 - not sure if this is relevant as it seems this thread has taken over the development of this mod. Here is my post about the issue of sync quantities from that other thread...but, once our site was up and running for a few days on the Linux server the user RoboPhung's version began behaving without issues as long as we had the settings as described here. (Not trying to confuse things further, Just getting in the game, guys, so I can stay in the loop of the newer developments on this valuable zencart need.)
Quote:
We have mostly non-attribute items up to about 1200 total. About thirty of those have attributes. We have RoboPhungs version installed and are still working on a sync quantities issue; However, everything else seems to be working very well in 1.5.1.
The sync issue for us is currently being solved by just pushing the "sync all quantities" link every day on the Config > SBA page, other wise, customers can check out without the help of a warning, only if the number of product with the chosen attribute is less than the total quantity of the product. Some weirdness that RoboPhung is working on and may just be some install issue on our end.
Check your install, (as if you haven't...but check it again anyways). Also, because single drop down does not work, check that under Config > Stock you are using:
Check stock level true
Product Info Single Attribute - multiple_dropdowns
Product Info Multiple Attribute - sequenced_dropdowns
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
1.5.1 Questions
What happens when I sync all quantities?
Can I change it so when people DO NOT select an option it prevents from ordering?
Can I change it so when products with attributes but no stock qty, it goes to unlimited?
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
milobloom
1.5.1 Questions
What happens when I sync all quantities?
It totals all attributes quantities for products and places it in products_quantity field.
Sync Quantities does it for individual products
Sync All Quantities performs the same task for all products.
Can I change it so when people DO NOT select an option it prevents from ordering?
Yes. Look under admin>Configuration>Stock
set Allow Checkout to false.
Can I change it so when products with attributes but no stock qty, it goes to unlimited?
Please explain more
I hope this helps.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
1.5.1 Questions
What happens when I sync all quantities?
Can I change it so when people DO NOT select an option it prevents from ordering?
Can I change it so when products with attributes but no stock qty, it goes to unlimited?
It updates the grand quantity based on the attribute quantities:
red: qty = 5
blue: qty = 3
sync quantity = 8
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
milobloom
1.5.1 Questions
What happens when I sync all quantities?
Can I change it so when people DO NOT select an option it prevents from ordering?
Or you can select an attribute as your default choice.
Can I change it so when products with attributes but no stock qty, it goes to unlimited?
Or you can try the above.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Hi, I have posted this in the dynamic filter thread already but thought I might give it a go here........I have dynamic filter installed on a v1.51 site, and i have just installed stock by attributes. Dynamic filter was working great before, but now the filter sidebox will only show attributes if they have stock assigned to them in the stock by attributes mod. As most my filters are read only and not meant to have stock levels this is a bit of a problem. Is there a work round this at all, or am i going to have to assign stock levels to all my read only attributes? Thanks in advance.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
kitten091182
Hi, I have posted this in the dynamic filter thread already but thought I might give it a go here........I have dynamic filter installed on a v1.51 site, and i have just installed stock by attributes. Dynamic filter was working great before, but now the filter sidebox will only show attributes if they have stock assigned to them in the stock by attributes mod. As most my filters are read only and not meant to have stock levels this is a bit of a problem. Is there a work round this at all, or am i going to have to assign stock levels to all my read only attributes? Thanks in advance.
Would you point me to the plugin link for this Dynamic Filter you referenced, I would like to look at it and maybe find out what issue you are having.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Can this plugin handle 2 selectable attributes? Need the customer to be able to choose size from one attribute and color from another. Using Zen Cart v1.5.1
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
Duckarina
Can this plugin handle 2 selectable attributes? Need the customer to be able to choose size from one attribute and color from another. Using Zen Cart v1.5.1
Yes, the version 1.5.1.2 does, but please tests on a local test setup to ensure this works as you would like.
It supports attributes for a product such as Size, Color, Material, shape, etc. The user would choose one of each available on a product. The included instructions explain how to set this up to work.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Hi Potteryhouse, The link is http://www.zen-cart.com/downloads.php?do=file&id=1361 Thanks for having a look for me.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
potteryhouse
Yes, the version 1.5.1.2 does, but please tests on a local test setup to ensure this works as you would like.
It supports attributes for a product such as Size, Color, Material, shape, etc. The user would choose one of each available on a product. The included instructions explain how to set this up to work.
I'm trying to figure this out as well. I've read the readme but the example used does not seem to cover issued asked about. The readme uses an example of a product with radio selection for sizes but two other read-only attributes. I can't figure out how to set this up for a product that comes in several colors and three sizes. When I click 'Add Quantity For Product Variant' I can add inventory for each combination of color and size, but the site shows all variations as out of stock.
Thanks.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
I believe, based on your question you want a functionality that is not implemented in this mod.
I refer to it (for lack of a better term) as Multiple attribute combinations.
Unfortunately, this mode does not yet support that type of combination.
There are thoughts on how to accomplish this when time permits........
The mod supports individual attributes for a product, you can have a Size selection, a Color selection, and or a Material selection.
but not a selection like Size, Color, Material. The difference being how the background code handles the combinations. The instructions strive to show what will work.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Yes, I would call it a multiple attribute combination. Maybe it's me, but the description seems to imply it does.
'It will work for a virtually unlimited number of amount of attribute combinations. For example, if you offered cotton or polyester shirts in green, red or blue and small medium or large sizes, this add-on would allow you to enter and maintain a separate stock level for each of the 18 possible combinations.'
My client does offer items in sizes and colors with each having it's own inventory. Just to be sure we are communicating clearly, the mod will not allow me to carry stock for each size and color combination?
(thanks for the quick reply)
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
No, not just yet, working on that.
I think the description was / is accurate from the perspective of when it was originally created a long time ago. Since then we (store owners / builders) have wanted and demanded much more, thus I recently decided to see if it could be accomplished.
I think it can be, but there is still some logic I need to workout for it to function properly, as always it is lack of time that slows one down.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Thanks for the clarification. I certainly understand the lack of time problem. Keep plugging away, it's a great plugin.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
I sell clothing, and have two attributes, color and size
color: red , blue, yellow
size: Small, Mid , Large
The red small shirt has stock of 56.
The red large shirt has zero stock.
How to acheive it with this add-on?
I just spent one week in finding how to get this done
any words is greatly appreciated!
Quote:
Originally Posted by
potteryhouse
No, not just yet, working on that.
I think the description was / is accurate from the perspective of when it was originally created a long time ago. Since then we (store owners / builders) have wanted and demanded much more, thus I recently decided to see if it could be accomplished.
I think it can be, but there is still some logic I need to workout for it to function properly, as always it is lack of time that slows one down.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Forgive me if this has been addressed before but I've not been able to find a solution. I'm using zencart 1.5.1 and Stock by Attribute 1.5.1.2.
The problem is with admin access management. Super users can use the module with no problem and it works great, other users, with the module allowed in their admin profile can access it but when the try to save get a restricted access message.
Looking at the admin logs it appears that page which "normal" users have the problem accessing is products_with_attribute_stock_ajax.php but I've no idea how to correct this.
Any help would be very welcome.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
Morrigan2350
Forgive me if this has been addressed before but I've not been able to find a solution. I'm using zencart 1.5.1 and Stock by Attribute 1.5.1.2.
The problem is with admin access management. Super users can use the module with no problem and it works great, other users, with the module allowed in their admin profile can access it but when the try to save get a restricted access message.
Looking at the admin logs it appears that page which "normal" users have the problem accessing is products_with_attribute_stock_ajax.php but I've no idea how to correct this.
Any help would be very welcome.
Hi,
No one I remember has mentioned this yet, I had not personally used restricted access yet but will look at that.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
mybiz9999
I sell clothing, and have two attributes, color and size
color: red , blue, yellow
size: Small, Mid , Large
The red small shirt has stock of 56.
The red large shirt has zero stock.
How to acheive it with this add-on?
I just spent one week in finding how to get this done
any words is greatly appreciated!
As a test, try setting the attribute stock page like the following (ignore the customid field, that will be in the next version)
Please let me know how this goes.
Code:
Product ID |
Product Name |
Image |
Product Model |
Quantity for all variants |
Add Quantity For Product Variant |
Sync Quantities |
---|
|
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
potteryhouse
Hi,
No one I remember has mentioned this yet, I had not personally used restricted access yet but will look at that.
I did some testing, this issue does not seem to be limited to the SBA module, I tried it on another unrelated add on module and got the same error.
There must be a setting that should be configured when adding a module to the configuration file or else-ware that has be updated.
When I have time I will look at this, if you happen to find an answer please let us know, and if it is something I can roll into the next version I will.
Thanks
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Hi,
I have just installed this addon and believe I'm almost to the point of getting it fully working. I have a problem where regardless which attributes I have set to a zero quantity, all options on the product page, whether dropdowns or radio buttons, are showing 'out of stock' when I set CONFIGURATION -> STOCK "Check Stock Level = True". Now, this may never have worked, or it is being affected by the new files. May just be something in the code around an array or something. I'm not confident on my own to take a stab at this, but a bit of direction would certainly help.
Any initial guesses?
Regards,
Chris
-
1 Attachment(s)
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
This is what the error looks like. Not only does it show a product that has quantity, but also has some formatting issues in the drop downs.
Attachment 13212
Again, any thoughts greatly appreciated. Note, I have done another clean install on another test site with the exact same issues.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
gohealth
This is what the error looks like. Not only does it show a product that has quantity, but also has some formatting issues in the drop downs.
Attachment 13212
Again, any thoughts greatly appreciated. Note, I have done another clean install on another test site with the exact same issues.
The file located at:
includes\languages\english\extra_definitions\products_with_attributes.php
is where the issue resides, simply update the file with a text editor and remove the <b> </b> found around the text.
As a note, I removed these from the next version we will post.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
gohealth
This is what the error looks like. Not only does it show a product that has quantity, but also has some formatting issues in the drop downs.
Attachment 13212
Again, any thoughts greatly appreciated. Note, I have done another clean install on another test site with the exact same issues.
Shouldn't this simply hidden when it is sold out instead of saying 'Out of Stock' ?
How can I make it so that when there are total of ;
Item size 'S' with 5 quantity
Item size 'M' with 5 quantity
Item size 'L' with 5 quantity
Then ... when the ..
1. Item size 'S' is sold out, Size attribute 'S' is hidden (not visible) to the customers. Leaving only Size 'M' and size 'L'
2. Item size 'M' is sold out, Size attribute 'M' is hidden not visible to the customers. Leaving only Size 'L'
3. Item size 'L' is sold out, All size attribute are hidden not visible to the customers. Leaving only 'OUT OF STOCK' for the product showing default Zencart 'OUT-OF-STOCK' ICON..
Of course above is only an example. In reality it applies to which ever size in what ever order happens (sold).
Love to be able to do that and looking forward to some solutions.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
oavs
Shouldn't this simply hidden when it is sold out instead of saying 'Out of Stock' ?
How can I make it so that when there are total of ;
Item size 'S' with 5 quantity
Item size 'M' with 5 quantity
Item size 'L' with 5 quantity
Then ... when the ..
1. Item size 'S' is sold out, Size attribute 'S' is hidden (not visible) to the customers. Leaving only Size 'M' and size 'L'
2. Item size 'M' is sold out, Size attribute 'M' is hidden not visible to the customers. Leaving only Size 'L'
3. Item size 'L' is sold out, All size attribute are hidden not visible to the customers. Leaving only 'OUT OF STOCK' for the product showing default Zencart 'OUT-OF-STOCK' ICON..
Of course above is only an example. In reality it applies to which ever size in what ever order happens (sold).
Love to be able to do that and looking forward to some solutions.
This version will show "Out of Stock" when the product level is zero. It was written to work that way. If you want to completely hide the attribute when stock is zero, you will need to find and older version and replace the file /YOUR_ADMIN/products_with_attributes_stock.php with this file
PHP Code:
<?php
/**
* @package admin
* @copyright Copyright 2003-2006 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: products_with_attributes_stock.php 389 2008-11-14 16:02:14Z hugo13 $
*/
require('includes/application_top.php');
require(DIR_WS_CLASSES . 'currencies.php');
require(DIR_WS_CLASSES . 'products_with_attributes_stock.php');
$stock = new products_with_attributes_stock;
if(isset($_SESSION['languages_id'])){ $language_id = $_SESSION['languages_id'];} else { $language_id=1;}
if(isset($_GET['action']))
{
$action = $_GET['action'];
}
else
{
$action = '';
}
switch($action)
{
case 'add':
if(isset($_GET['products_id']) and is_numeric((int)$_GET['products_id']))
{
$products_id = (int)$_GET['products_id'];
}
if(isset($_POST['products_id']) and is_numeric((int)$_POST['products_id']))
{
$products_id = (int)$_POST['products_id'];
}
if(isset($products_id))
{
if(zen_products_id_valid($products_id))
{
$product_name = zen_get_products_name($products_id);
$product_attributes = $stock->get_products_attributes($products_id, $language_id);
$hidden_form .= zen_draw_hidden_field('products_id',$products_id)."\n";
}
else
{
zen_redirect(zen_href_link(FILENAME_PRODUCTS_WITH_ATTRIBUTES_STOCK, zen_get_all_get_params(array('action')), 'NONSSL'));
}
}
else
{
$query = 'SELECT DISTINCT
attrib.products_id, description.products_name
FROM
'.TABLE_PRODUCTS_ATTRIBUTES.' attrib, '.TABLE_PRODUCTS_DESCRIPTION.' description
WHERE
attrib.products_id = description.products_id and description.language_id='.$language_id.' order by description.products_name';
$products = $db->execute($query);
while(!$products->EOF)
{
$products_array_list[] = array(
'id' => $products->fields['products_id'],
'text' => $products->fields['products_name']
);
$products->MoveNext();
}
}
break;
case 'edit':
$hidden_form = '';
if(isset($_GET['products_id']) and is_numeric((int)$_GET['products_id']))
{
$products_id = $_GET['products_id'];
}
if(isset($_GET['attributes']))
{
$attributes = $_GET['attributes'];
}
if(isset($products_id) and isset($attributes))
{
$attributes = explode(',',$attributes);
foreach($attributes as $attribute_id){
$hidden_form .= zen_draw_hidden_field('attributes[]',$attribute_id)."\n";
$attributes_list[] = $stock->get_attributes_name($attribute_id, $language_id);
}
$hidden_form .= zen_draw_hidden_field('products_id',$products_id)."\n";
}
else
{
zen_redirect(zen_href_link(FILENAME_PRODUCTS_WITH_ATTRIBUTES_STOCK, zen_get_all_get_params(array('action')), 'NONSSL'));
}
break;
case 'confirm':
if(isset($_POST['products_id']) and is_numeric((int)$_POST['products_id']))
{
if(!isset($_POST['quantity']) || !is_numeric($_POST['quantity']))
{
zen_redirect(zen_href_link(FILENAME_PRODUCTS_WITH_ATTRIBUTES_STOCK, zen_get_all_get_params(array('action')), 'NONSSL'));
}
$products_id = $_POST['products_id'];
$product_name = zen_get_products_name($products_id);
if(is_numeric($_POST['quantity']))
{
$quantity = $_POST['quantity'];
}
$attributes = $_POST['attributes'];
foreach($attributes as $attribute_id)
{
$hidden_form .= zen_draw_hidden_field('attributes[]',$attribute_id)."\n";
$attributes_list[] = $stock->get_attributes_name($attribute_id, $_SESSION['languages_id']);
}
$hidden_form .= zen_draw_hidden_field('products_id',$products_id)."\n";
$hidden_form .= zen_draw_hidden_field('quantity',$quantity)."\n";
$s_mack_noconfirm .="products_id=" . $products_id . "&"; //s_mack:noconfirm
$s_mack_noconfirm .="quantity=" . $quantity . "&"; //s_mack:noconfirm
if(sizeof($attributes) > 1)
{
sort($attributes);
$stock_attributes = implode(',',$attributes);
}
else
{
$stock_attributes = $attributes[0];
}
$s_mack_noconfirm .='attributes=' . $stock_attributes . '&'; //kuroi: to pass string not array
$query = 'select * from '.TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK.' where products_id = '.$products_id.' and stock_attributes="'.$stock_attributes.'"';
$stock_check = $db->Execute($query);
if(!$stock_check->EOF)
{
$hidden_form .= zen_draw_hidden_field('add_edit','edit');
$hidden_form .= zen_draw_hidden_field('stock_id',$stock_check->fields['stock_id']);
$s_mack_noconfirm .="stock_id=" . $stock_check->fields['stock_id'] . "&"; //s_mack:noconfirm
$s_mack_noconfirm .="add_edit=edit&"; //s_mack:noconfirm
$add_edit = 'edit';
}
else
{
$hidden_form .= zen_draw_hidden_field('add_edit','add')."\n";
$s_mack_noconfirm .="add_edit=add&"; //s_mack:noconfirm
}
}
else
{
zen_redirect(zen_href_link(FILENAME_PRODUCTS_WITH_ATTRIBUTES_STOCK, zen_get_all_get_params(array('action')), 'NONSSL'));
}
zen_redirect(zen_href_link(FILENAME_PRODUCTS_WITH_ATTRIBUTES_STOCK, $s_mack_noconfirm . "action=execute", 'NONSSL')); //s_mack:noconfirm
break;
case 'execute':
$attributes = $_POST['attributes'];
if ($_GET['attributes']) { $attributes = $_GET['attributes']; } //s_mack:noconfirm
$products_id = $_POST['products_id'];
if ($_GET['products_id']) { $products_id = $_GET['products_id']; } //s_mack:noconfirm
$quantity = $_GET['quantity']; //s_mack:noconfirm
if ($_GET['quantity']) { $quantity = $_GET['quantity']; } //s_mack:noconfirm
if(!is_numeric((int)$quantity)) //s_mack:noconfirm
{
zen_redirect(zen_href_link(FILENAME_PRODUCTS_WITH_ATTRIBUTES_STOCK, zen_get_all_get_params(array('action')), 'NONSSL'));
}
/*
michael mcinally <[email protected]>
heavily modified version to allow inserting "ALL" attributes at once
also should probably run this SQL command as well:
ALTER TABLE `products_with_attributes_stock` ADD UNIQUE `products_id_stock_attributes` (`products_id`, `stock_attributes`);
*/
if(($_POST['add_edit'] == 'add') || ($_GET['add_edit'] == 'add')) //s_mack:noconfirm
{
if (preg_match("/\|/", $attributes)) {
$arrTemp = preg_split("/\,/", $attributes);
$arrMain = array();
$intCount = 0;
for ($i = 0;$i < sizeof($arrTemp);$i++) {
$arrTemp1 = preg_split("/\|/", $arrTemp[$i]);
$arrMain[] = $arrTemp1;
if ($intCount) {
$intCount = $intCount * sizeof($arrTemp1);
} else {
$intCount = sizeof($arrTemp1);
}
}
$intVars = sizeof($arrMain);
$arrNew = array();
if ($intVars >= 1) {
eval('
for ($i = 0;$i < sizeof($arrMain[0]);$i++) {
if ($intVars >= 2) {
for ($j = 0;$j < sizeof($arrMain[1]);$j++) {
if ($intVars >= 3) {
for ($k = 0;$k < sizeof($arrMain[2]);$k++) {
if ($intVars >= 4) {
for ($l = 0;$l < sizeof($arrMain[3]);$l++) {
if ($intVars >= 5) {
for ($m = 0;$m < sizeof($arrMain[4]);$m++) {
if ($intVars >= 6) {
for ($n = 0;$n < sizeof($arrMain[5]);$n++) {
$arrNew[] = array($arrMain[0][$i], $arrMain[1][$j], $arrMain[2][$k], $arrMain[3][$l], $arrMain[4][$m], $arrMain[5][$n]);
}
} else {
$arrNew[] = array($arrMain[0][$i], $arrMain[1][$j], $arrMain[2][$k], $arrMain[3][$l], $arrMain[4][$m]);
}
}
} else {
$arrNew[] = array($arrMain[0][$i], $arrMain[1][$j], $arrMain[2][$k], $arrMain[3][$l]);
}
}
} else {
$arrNew[] = array($arrMain[0][$i], $arrMain[1][$j], $arrMain[2][$k]);
}
}
} else {
$arrNew[] = array($arrMain[0][$i], $arrMain[1][$j]);
}
}
} else {
$arrNew[] = array($arrMain[0][$i]);
}
}
');
}
for ($i = 0;$i < sizeof($arrNew);$i++) {
$strAttributes = implode(",", $arrNew[$i]);
$query = 'insert into `'.TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK.'` (`products_id`,`stock_attributes`,`quantity`) values ('.$products_id.',"'.$strAttributes.'",'.$quantity.') ON DUPLICATE KEY UPDATE `stock_attributes` = "'.$strAttributes.'", `quantity` = '.$quantity;
$db->Execute($query);
}
} else {
$query = 'insert into `'.TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK.'` (`products_id`,`stock_attributes`,`quantity`) values ('.$products_id.',"'.$attributes.'",'.$quantity.')';
$db->Execute($query);
}
}
elseif(($_POST['add_edit'] == 'edit') || ($_GET['add_edit'] == 'edit')) //s_mack:noconfirm
{
$stock_id = $_POST['stock_id']; //s_mack:noconfirm
if ($_GET['stock_id']) { $stock_id = $_GET['stock_id']; } //s_mack:noconfirm
if(!is_numeric((int)$stock_id)) //s_mack:noconfirm
{
zen_redirect(zen_href_link(FILENAME_PRODUCTS_WITH_ATTRIBUTES_STOCK, zen_get_all_get_params(array('action')), 'NONSSL'));
}
$query = 'update `'.TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK.'` set quantity='.$quantity.' where stock_id='.$stock_id.' limit 1';
$db->Execute($query);
}
$stock->update_parent_products_stock($products_id);
$messageStack->add_session('Product successfully updated', 'success');
zen_redirect(zen_href_link(FILENAME_PRODUCTS_WITH_ATTRIBUTES_STOCK, '', 'NONSSL'));
break;
case 'delete':
if(!isset($_POST['confirm']))
{
// do nothing
}
else
{
// delete it
if($_POST['confirm'] == TEXT_YES){
$query = 'delete from '.TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK.' where products_id="'.$_POST['products_id'].'" and stock_attributes="'.$_POST['attributes'].'" limit 1';
$db->Execute($query);
$stock->update_parent_products_stock((int)$_POST['products_id']);
$messageStack->add_session('Product Variant was deleted', 'failure');
zen_redirect(zen_href_link(FILENAME_PRODUCTS_WITH_ATTRIBUTES_STOCK, '', 'NONSSL'));
} else {
zen_redirect(zen_href_link(FILENAME_PRODUCTS_WITH_ATTRIBUTES_STOCK, '', 'NONSSL'));
}
}
break;
case 'resync':
if(is_numeric((int)$_GET['products_id'])){
$stock->update_parent_products_stock((int)$_GET['products_id']);
$messageStack->add_session('Parent Product Quantity Updated', 'success');
zen_redirect(zen_href_link(FILENAME_PRODUCTS_WITH_ATTRIBUTES_STOCK, '', 'NONSSL'));
} else {
zen_redirect(zen_href_link(FILENAME_PRODUCTS_WITH_ATTRIBUTES_STOCK, '', 'NONSSL'));
}
break;
case 'resync_all':
$stock->update_all_parent_products_stock();
$messageStack->add_session('Parent Product Quantities Updated', 'success');
zen_redirect(zen_href_link(FILENAME_PRODUCTS_WITH_ATTRIBUTES_STOCK, '', 'NONSSL'));
break;
case 'auto_sort':
// get all attributes
$sql = $db->Execute("SELECT stock_id, stock_attributes FROM " . TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK . " ORDER BY stock_id ASC;");
$count = 0;
while (!$sql->EOF) {
// get main attribute only for sort
$attributes = explode(',', $sql->fields['stock_attributes']);
$main_attribute_id = $attributes[0];
// get the sort order
$sort_query = "SELECT pa.products_attributes_id, pov.products_options_values_sort_order as sort
FROM " . TABLE_PRODUCTS_ATTRIBUTES . " pa
LEFT JOIN " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov on (pov.products_options_values_id = pa.options_values_id)
WHERE pa.products_attributes_id = " . $main_attribute_id . "
LIMIT 1;";
$sort = $db->Execute($sort_query);
$sort = $sort->fields['sort'];
// update sort in db
$db->Execute("UPDATE " . TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK . " set sort = '" . $sort . "' WHERE stock_id = '" . $sql->fields['stock_id'] . "' LIMIT 1;");
$count++;
$sql->MoveNext();
}
$messageStack->add_session($count . ' stock attributes updated for sort by primary attribute sort order', 'success');
zen_redirect(zen_href_link(FILENAME_PRODUCTS_WITH_ATTRIBUTES_STOCK, '', 'NONSSL'));
break;
default:
// Show a list of the products
break;
}
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<link rel="stylesheet" type="text/css" href="includes/stylesheet.css">
<link rel="stylesheet" type="text/css" href="includes/cssjsmenuhover.css" media="all" id="hoverJS">
<link rel="stylesheet" type="text/css" href="includes/products_with_attributes_stock_ajax.css" media="all" id="hoverJS">
<script language="javascript" type="text/javascript" src="../ajax/jquery.js"></script>
<script language="javascript" type="text/javascript" src="../ajax/jquery.form.js"></script>
<script language="javascript" type="text/javascript" src="../ajax/products_with_attributes_stock_ajax.js"></script>
<script language="javascript" type="text/javascript" src="includes/menu.js"></script>
<script language="javascript" type="text/javascript" src="includes/general.js"></script>
<script type="text/javascript">
<!--
function init()
{
cssjsmenu('navbar');
if (document.getElementById)
{
var kill = document.getElementById('hoverJS');
kill.disabled = true;
}
}
// -->
</script>
</head>
<body onLoad="init()">
<!-- header //-->
<?php
require(DIR_WS_INCLUDES . 'header.php');
?>
<!-- header_eof //-->
<div style="padding: 20px;">
<!-- body_text_eof //-->
<!-- body_eof //-->
<?php
switch($action)
{
case 'add':
if(isset($products_id))
{
echo zen_draw_form('final_refund_exchange', FILENAME_PRODUCTS_WITH_ATTRIBUTES_STOCK, 'action=confirm', 'post', '', true)."\n";
echo $hidden_form;
echo '<p><strong>'.$product_name.'</strong></p>'."\n";
foreach($product_attributes as $option_name => $options)
{
// MULTI
$arrValues = array();
if (is_array($options)) {
if (sizeof($options) > 0) {
foreach ($options as $k => $a) {
$arrValues[] = $a['id'];
}
}
}
array_unshift($options, array('id' => implode("|", $arrValues), 'text' => 'All'));
echo '<p><strong>'.$option_name.': </strong>';
echo zen_draw_pull_down_menu('attributes[]',$options).'</p>'."\n";
}
echo '<p><strong>' . PWA_QUANTITY . '</strong>'.zen_draw_input_field('quantity').'</p>'."\n";
}
else
{
echo zen_draw_form('final_refund_exchange', FILENAME_PRODUCTS_WITH_ATTRIBUTES_STOCK, 'action=add', 'post', '', true)."\n";
echo zen_draw_pull_down_menu('products_id',$products_array_list)."\n";
}
?>
<p><input type="submit" value="<?php echo PWA_SUBMIT ?>"></p>
</form>
<?php
break;
case 'edit':
echo zen_draw_form('final_refund_exchange', FILENAME_PRODUCTS_WITH_ATTRIBUTES_STOCK, 'action=confirm', 'post', '', true)."\n";
echo '<h3>'.zen_get_products_name($products_id).'</h3>';
foreach($attributes_list as $attributes)
{
echo '<p><strong>'.$attributes['option'].': </strong>'.$attributes['value'].'</p>';
}
echo $hidden_form;
echo '<p><strong>Quantity: </strong>'.zen_draw_input_field('quantity', $_GET['q']).'</p>'."\n"; //s_mack:prefill_quantity
?>
<p><input type="submit" value="<?php echo PWA_SUBMIT ?>"></p>
</form>
<?php
break;
case 'delete':
if(!isset($_POST['confirm']))
{
echo zen_draw_form('final_refund_exchange', FILENAME_PRODUCTS_WITH_ATTRIBUTES_STOCK, 'action=delete', 'post', '', true)."\n";
echo PWA_DELETE_VARIANT_CONFIRMATION;
foreach($_GET as $key=>$value)
{
echo zen_draw_hidden_field($key,$value);
}
?>
<p><input type="submit" value="<?php echo TEXT_YES ?>" name="confirm"> * <input type="submit" value="<?php echo TEXT_NO ?>" name="confirm"></p>
</form>
<?php
}
break;
case 'confirm':
echo '<h3>Confirm '.$product_name.'</h3>';
foreach($attributes_list as $attributes)
{
echo '<p><strong>'.$attributes['option'].': </strong>'.$attributes['value'].'</p>';
}
echo '<p><strong>Quantity</strong>'.$quantity.'</p>';
echo zen_draw_form('final_refund_exchange', FILENAME_PRODUCTS_WITH_ATTRIBUTES_STOCK, 'action=execute', 'post', '', true)."\n";
echo $hidden_form;
?>
<p><input type="submit" value="<?php echo PWA_SUBMIT ?>"></p>
</form>
<?php
break;
default:
echo '<div id="hugo1" style="background-color: green; padding: 2px 10px;"></div>';
echo '<form method="get" action="' . zen_href_link(FILENAME_PRODUCTS_WITH_ATTRIBUTES_STOCK, '', 'NONSSL') . '" id="pwas-search" name="pwas-search">Search: <input id="pwas-filter" type="text" name="search"/><input type="submit" value="Search" id="pwas-search-button" name="pwas-search-button"/></form><span style="margin-right:10px;"> </span>';
echo '<a href="' . zen_href_link(FILENAME_PRODUCTS_WITH_ATTRIBUTES_STOCK, '', 'NONSSL') . '">Reset</a><span style="margin-right:10px;"> </span><a href="' . zen_href_link(FILENAME_PRODUCTS_WITH_ATTRIBUTES_STOCK, 'action=auto_sort', 'NONSSL') . '">Sort</a>';
echo '<span id="loading" style="display: none;"><img src="../images/ajax-loader2.gif" alt="" /> Loading...</span><hr />';
echo '<a class="forward" style="float:right;" href="'.zen_href_link(FILENAME_PRODUCTS_WITH_ATTRIBUTES_STOCK, "action=resync_all", 'NONSSL').'"><strong>Sync All Quantities</strong></a><br class="clearBoth" /><hr />';
echo '<div id="pwa-table">';
echo $stock->displayFilteredRows();
echo '</div>';
break;
}
?>
<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br />
</div>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
oavs
Shouldn't this simply hidden when it is sold out instead of saying 'Out of Stock' ?
How can I make it so that when there are total of ;
Item size 'S' with 5 quantity
Item size 'M' with 5 quantity
Item size 'L' with 5 quantity
Then ... when the ..
1. Item size 'S' is sold out, Size attribute 'S' is hidden (not visible) to the customers. Leaving only Size 'M' and size 'L'
2. Item size 'M' is sold out, Size attribute 'M' is hidden not visible to the customers. Leaving only Size 'L'
3. Item size 'L' is sold out, All size attribute are hidden not visible to the customers. Leaving only 'OUT OF STOCK' for the product showing default Zencart 'OUT-OF-STOCK' ICON..
Of course above is only an example. In reality it applies to which ever size in what ever order happens (sold).
Love to be able to do that and looking forward to some solutions.
There are several ways to do what you are asking, you will need to try each to see which one you prefer.
The first is simply to edit the language file and change ' Out of Stock: ' to ''
includes\languages\english\extra_definitions\products_with_attributes.php
Another option is as easy, change the settings in the Configuration/Stock page.
Set the "Check stock Level" to false
and
set the Allow checkout to false.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Nice to see this update done:
Combining this functionality into the "main" (original) version of SBA means that there is one less variant out there to add to the confusion that is SBA.. Well done!:smile: Maybe I'll give this version of SBA another looksee.. Seems like there's been some good movement..
-
2 Attachment(s)
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Hi!
Just installed this and it seems to be working in most cases. The problem I'm having is on an item with 2 attributes. When I set one of the items to 0 (out of stock), as a customer I don't see that item as out of stock until I add it to my cart, but the problem is when I add the same item with a different attribute and it ALSO show as out of stock when it really is not.
Attachment 13326
First one has no stock, when added to cart it informs me such... ok
Second one has 11 items in stock, when added to cart, it says the same thing as the first item... not ok
Attachment 13327
I have a different product that has only one attribute and it's working as expected and showing 'out of stock' on the product page.
Thanks,
Leslie
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5+
Good afternoon,
The search function doesn't really help me find the answer and this is a very long thread to read through start-to-finish, so I thought I'd just ask:
I have a custom template, and I have added the plugin to my install. The administration works fine and I can add attribute stock fine, but in the product area it only displays the overall quantity not the breakdown of in stock items. Do I need to change something to do so? I did upload the template files included in the plugin to the template directory.
Cheers,
Peter M Dodge
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5+
Hi,
Just installed this on zen cart 1.5.1 and it works a treat, but I have a small issue. We used to be able to into an order and add products to the order and resend the invoice for payment. This module seems to have removed this facility from the order.php page. Can this be put back in?
Also, not sure is this applies to this thread, but is there any way that the (+£2.00) can disappear from the attribute on the product page and just show the full price when you choose the attribute?
Cheers, Phil.
-
1 Attachment(s)
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5+
Hello,
Also when setting these attributes I get mysterious text appearing as below. How do I get rid of this please?
Attachment 13328
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
lunabug
Hi!
Just installed this and it seems to be working in most cases. The problem I'm having is on an item with 2 attributes. When I set one of the items to 0 (out of stock), as a customer I don't see that item as out of stock until I add it to my cart, but the problem is when I add the same item with a different attribute and it ALSO show as out of stock when it really is not.
Attachment 13326
The "Multiple" attribute combination (two or more attributes in the same row), is not yet functional in this version, this is noted in the instructions on the Notes page. you can have these all listed in separate rows and it will work.
I have been told there is a work-around if you must have multiple attributes in the same row, but stock checks will not be accurate, have a look at post:
http://www.zen-cart.com/showthread.p...03#post1222803
This shows an optional way to configure the multiple attributes per row, but remember it will be buggy when using this configuration.
The best setup in this version is to configured as shown in the instructions, then the mod works as expected.
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5+
Quote:
Originally Posted by
Philman1008
Hello,
Also when setting these attributes I get mysterious text appearing as below. How do I get rid of this please?
Attachment 13328
This display error seems to be caused by an error in one of the files you made a change to, my guess is that you are missing an open or closing quotation mark in a file, or that there is an extra one added. Use a compare program (such as winmerg or beyond compare) and compare the original file to the one you updated, look for missing or extra quotes.
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5+
Quote:
Originally Posted by
Peter M Dodge
Good afternoon,
The search function doesn't really help me find the answer and this is a very long thread to read through start-to-finish, so I thought I'd just ask:
I have a custom template, and I have added the plugin to my install. The administration works fine and I can add attribute stock fine, but in the product area it only displays the overall quantity not the breakdown of in stock items. Do I need to change something to do so? I did upload the template files included in the plugin to the template directory.
Cheers,
Peter M Dodge
Did you configure the "Configuration/Stock" options for SBA? one of those settings is to display the quantity next to the attribute selection. The Instructions explain these settings.
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5+
Quote:
Originally Posted by
potteryhouse
Did you configure the "Configuration/Stock" options for SBA? one of those settings is to display the quantity next to the attribute selection. The Instructions explain these settings.
Yes, I did set this option, which is why I am wondering why if there are additional template steps required.
Cheers,
Peter M Dodge
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
I've been looking for a solution but probably don't know how to name my need. I'm sure that this is a common problem, thus I want to ask you before I start coding it. I need to make a separate textfields for quantities of each color. "Add to cart" button should transfer all chosen colors to a cart.
An example is shown on this site:
Colors example
I'm using zencart 1.5 not upgraded.
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
I just downloaded the most recent version of Stock By Attributes. V1.5.2.
Because I need to require that a user select a size on the product info page, I have created the following attributes:
Size:
Please Choose An Option... [display only, default]
Small
Medium
Large
In a previous version of Stock By Attributes I had to select the option 'Please Choose An Options..' from the products_with_attributes_stock.php page in Admin, and give it a stock value of 1. This option shows up on products that are already on the site.
In this version, the option 'Please Choose An Option...' does not show up in the products_with_attributes_stock.php page in Admin. I get a 'N/A' value instead. Which is great as it should not require a stock value; however, the 'Please Choose An Option...' value does not show up in the front end on a product I just added Size attributes to, thus not forcing the user to select a size before adding to cart.
Any ideas on what to do? Did I miss something?
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Please read the comments in red.
Quote:
Originally Posted by
lunabug
Hi!
Just installed this and it seems to be working in most cases. The problem I'm having is on an item with 2 attributes. When I set one of the items to 0 (out of stock), as a customer I don't see that item as out of stock until I add it to my cart,
Under admin>Configuration>Stock
set
Check stock level = true. They will get the Out of stock warning on the product_info page
but the problem is when I add the same item with a different attribute and it ALSO show as out of stock when it really is not.
and one of them is out of stock, you will get the red
Attachment 13326
First one has no stock, when added to cart it informs me such... ok
Second one has 11 items in stock, when added to cart, it says the same thing as the first item... not ok
Attachment 13327
I have a different product that has only one attribute and it's working as expected and showing 'out of stock' on the product page.
Thanks,
Leslie
I hoe it helps.
-
2 Attachment(s)
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Quote:
Originally Posted by
k1ra
I just downloaded the most recent version of Stock By Attributes. V1.5.2.
Because I need to require that a user select a size on the product info page, I have created the following attributes:
Size:
Please Choose An Option... [display only, default]
Small
Medium
Large
In a previous version of Stock By Attributes I had to select the option 'Please Choose An Options..' from the products_with_attributes_stock.php page in Admin, and give it a stock value of 1. This option shows up on products that are already on the site.
In this version, the option 'Please Choose An Option...' does not show up in the products_with_attributes_stock.php page in Admin. I get a 'N/A' value instead. Which is great as it should not require a stock value; however, the 'Please Choose An Option...' value does not show up in the front end on a product I just added Size attributes to, thus not forcing the user to select a size before adding to cart.
Any ideas on what to do? Did I miss something?
I believe you can do this, Add a read only selection as the first size (use whatever text makes sense, I just used Please Choose as a same here) see the attached images.
I added this attribute and set to sort order 0.
Attachment 13332
This is how it will display on the product page, forcing the customer to make a selection.
Attachment 13333
This is also explained in the following thread.
http://www.zen-cart.com/showthread.p...215#post921215
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5+
Hello,
Thank you for this response:
Quote:
This display error seems to be caused by an error in one of the files you made a change to, my guess is that you are missing an open or closing quotation mark in a file, or that there is an extra one added
I have not amended any files beyond installing the basic SBA mod. Do you know which file this would relate to so I can try and find the issue?
Regards, Phil.
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5+
Quote:
Originally Posted by
Philman1008
Hello,
Thank you for this response:
I have not amended any files beyond installing the basic SBA mod. Do you know which file this would relate to so I can try and find the issue?
Regards, Phil.
In the file attributes.php make these changes. This should resolve your display error.
On line 199 change this:
Code:
$products_options_display_price = ATTRIBUTES_PRICE_DELIMITER_PREFIX . '<span class="productSpecialPrice">' . $products_options->fields['price_prefix'] . $currencies->display_price($new_attributes_price, zen_get_tax_rate($product_info->fields['products_tax_class_id'])) . '</span>' . ATTRIBUTES_PRICE_DELIMITER_SUFFIX;
To this:
Code:
$products_options_display_price = ATTRIBUTES_PRICE_DELIMITER_PREFIX . $products_options->fields['price_prefix'] . $currencies->display_price($new_attributes_price, zen_get_tax_rate($product_info->fields['products_tax_class_id'])) . ATTRIBUTES_PRICE_DELIMITER_SUFFIX;
On line 224 change this:
Code:
$originalpricedisplaytext = ATTRIBUTES_PRICE_DELIMITER_PREFIX . '<span class="normalprice">' . $products_options->fields['price_prefix'] . $currencies->display_price( zen_get_attributes_price_final($products_options->fields["products_attributes_id"], 1, '', 'false'), zen_get_tax_rate($product_info->fields['products_tax_class_id'])) . '</span>' . ATTRIBUTES_PRICE_DELIMITER_SUFFIX;
To this:
Code:
$originalpricedisplaytext = ATTRIBUTES_PRICE_DELIMITER_PREFIX . $products_options->fields['price_prefix'] . $currencies->display_price( zen_get_attributes_price_final($products_options->fields["products_attributes_id"], 1, '', 'false'), zen_get_tax_rate($product_info->fields['products_tax_class_id'])) . ATTRIBUTES_PRICE_DELIMITER_SUFFIX;
-
Stock by Attribute Version 1.5.2.x TEST
This version (1.5.2.x_TEST) is provided to get feedback for the next version to be posted to the plug-ins.
This is a test version only.
The attributes.php file has been moved to an overrides folder.
There was no change to the database.
The following files have been updated. The update is based on Version 1.5.2:
admin\includes\classes\products_with_attributes_stock.php
admin\products_with_attributes_stock.php
admin\stock_by_attr_install.php
includes\functions\extra_functions\products_with_attributes.php
This file has been moved to an override folder, rename 'YOUR_TEMPLATE' to your template name:
includes\modules\YOUR_TEMPLATE\attributes.php
This version should resolve several display problems and a few other things that have been posted in the forum.
1. Dynamic Filter not working correctly with SBA.
2. <span> tag in the drop-down selection list.
3. QTY: showing up on read-only attributes.
4. <b> tag showing up in drop-down selection list.
Please use only on a TEST installation and provide thoughts, suggestions, feedback.
Attachment 13355
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5+
Quote:
Originally Posted by
potteryhouse
In the file attributes.php make these changes. This should resolve your display error.
On line 199 change this:
Code:
$products_options_display_price = ATTRIBUTES_PRICE_DELIMITER_PREFIX . '<span class="productSpecialPrice">' . $products_options->fields['price_prefix'] . $currencies->display_price($new_attributes_price, zen_get_tax_rate($product_info->fields['products_tax_class_id'])) . '</span>' . ATTRIBUTES_PRICE_DELIMITER_SUFFIX;
To this:
Code:
$products_options_display_price = ATTRIBUTES_PRICE_DELIMITER_PREFIX . $products_options->fields['price_prefix'] . $currencies->display_price($new_attributes_price, zen_get_tax_rate($product_info->fields['products_tax_class_id'])) . ATTRIBUTES_PRICE_DELIMITER_SUFFIX;
On line 224 change this:
Code:
$originalpricedisplaytext = ATTRIBUTES_PRICE_DELIMITER_PREFIX . '<span class="normalprice">' . $products_options->fields['price_prefix'] . $currencies->display_price( zen_get_attributes_price_final($products_options->fields["products_attributes_id"], 1, '', 'false'), zen_get_tax_rate($product_info->fields['products_tax_class_id'])) . '</span>' . ATTRIBUTES_PRICE_DELIMITER_SUFFIX;
To this:
Code:
$originalpricedisplaytext = ATTRIBUTES_PRICE_DELIMITER_PREFIX . $products_options->fields['price_prefix'] . $currencies->display_price( zen_get_attributes_price_final($products_options->fields["products_attributes_id"], 1, '', 'false'), zen_get_tax_rate($product_info->fields['products_tax_class_id'])) . ATTRIBUTES_PRICE_DELIMITER_SUFFIX;
I made these changes and the product will simply not display at all now :-( Any ideas?
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5+
Quote:
Originally Posted by
Philman1008
I made these changes and the product will simply not display at all now :-( Any ideas?
Try the test version I posted above (post #1762). It should resolve that issue, I made changes to adjust for the selection drop-down lists problems.
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5+
Can you disable a Attribute Option type from being port of SBA? For example you have Attribute Option type "Read Only". I want to make a attribute called Gift Wrap and put in values "Yes" and "No". Can I tell SBA if the attribute option type is "Read Only" then do not add it to part of the "Products with Attribute Stock". Right now if I have 10 "xs" 'blue" shirts for me to use Gift Wrap I would have to have 10 xs blue shirts with "Gift Wrap" marked "Yes" and 10 xs blue shirts with "Gift Wrap" marked "No".
Thanks
Brad
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5+
Quote:
Originally Posted by
bradlawson25
Can you disable a Attribute Option type from being port of SBA? For example you have Attribute Option type "Read Only". I want to make a attribute called Gift Wrap and put in values "Yes" and "No". Can I tell SBA if the attribute option type is "Read Only" then do not add it to part of the "Products with Attribute Stock". Right now if I have 10 "xs" 'blue" shirts for me to use Gift Wrap I would have to have 10 xs blue shirts with "Gift Wrap" marked "Yes" and 10 xs blue shirts with "Gift Wrap" marked "No".
Thanks
Brad
Hi,
Setting a selection as read-only and trying to add to the cart will not work as you want. But, you can turn off the QTY, and other tests for stock in the "Configuration > Stock" page and add the yes/no as another selection on the product. You will then have to add the new selection in the stock page and place a large value in it.
While thinking about your problem, I looked at a change to the mod last night that may resolve your issue and provide more flexibility in this mod for the future, but it will take a few days to get the updates done. When I finish I will post it here as a new version for testing. Please provide feedback on it so I know if this approach is useful.
This is the basic concept I am using for the new change I am making:
Add another selection type for use when making "Attribute Names" the new type will be set to generic / general, and will not have any of the added text the other types get for display on the Product page or in the shopping cart and will not be tracked for stock.
The main use I see for this will be for Selections that do not need or have an associated quantity, such as a Yes / No selection, or when a color, or size selection that is not tied to an available quantity (qty independent). In these cases the selection will not need to be in the Stock page since no stock will be tracked against these new types.
The goal is to keep existing functionality while expanding available options. This change will affect several files, as a minimum it touches the attributes.php, product info, and shopping cart checkout pages. It also will require running an sql file to add the new options to the database.
-
SBA Test version 1.5.X
Attachment 13405
This version (1.5.X_TEST_1) is provided to get feedback for the next version to be posted to the plug-ins.
This is a test version only.
There IS a change to the database.
The attributes.php file has been moved to an overrides folder.
The following files have been updated. The update is based on Version 1.5.2:
admin\includes\classes\products_with_attributes_stock.php
admin\products_with_attributes_stock.php
admin\stock_by_attr_install.php
includes\functions\functions_lookups.php
includes\functions\extra_functions\products_with_attributes.php
includes\modules\pages\shopping_cart\header_php.php
includes\modules\YOUR_TEMPLATE\attributes.php
This file has been moved to an override folder, rename 'YOUR_TEMPLATE' to your template name:
includes\modules\YOUR_TEMPLATE\attributes.php
This version should resolve most display problems and other items that have been posted in the forum.
This version also supports "Multiple-Attribute-Combinations" i.e., it allows for multiple attributes for a product in the SAME Stock ROW on the stock page, thus you can create custom combinations with specific quantities.
Short list of some items resolved:
1. Dynamic Filter not working correctly with SBA.
2. <span> tag in the drop-down selection list.
3. QTY: showing up on read-only attributes.
4. <b> tag showing up in drop-down selection list.
5. Option to add a yes/no selection list that will not be tied to a stock level (New Attribute Name "SBA Select List (Dropdown) Basic" added to support this option)
6. New functionality (NEEDS TESTING by more then just me) that supports "Multiple-Attribute-Combinations".
Please use only on a TEST installation and provide thoughts, suggestions, feedback.
Depending on what feedback I get, I plan to submit this to the Plug-ins on Zen Cart early next month as Version 1.5.3, since it contains significant changes.
-
Re: SBA Test version 1.5.X
I have a question about upgrading a store from 1.39h to 1.5x versions of Zencart.
What does stock by attributes do in this case? will it stop working?
I think the new versions of zencart have a stock system built in? Can I import the stock levels either to zencarts new system or to a different version of SBA that works with 1.5x?
I did search this thread for this info but didnt get far..
-
Re: SBA Test version 1.5.X
Quote:
Originally Posted by
Chargin
I have a question about upgrading a store from 1.39h to 1.5x versions of Zencart.
What does stock by attributes do in this case? will it stop working?
You will have to update the files of SBA with the most current, the previous version will not work correctly with Zen Cart 1.5.1.
I think the new versions of zencart have a stock system built in? Can I import the stock levels either to zencarts new system or to a different version of SBA that works with 1.5x?
The version of SBA in Zen Cart 1.5.1 is similar to the 1.3.9 version, if you want the attribute stock you will still need the SBA mod installed.
Your current SBA table will be upgraded if you use the script. BUT, test this on a TEST setup prior to doing the upgrade and BACKUP EVERYTHING before you start.
I did search this thread for this info but didnt get far..
Once you have upgraded your site to 1.5.1, than update the SBA files with the current available from the Plug-ins. The setup script in SBA will update your current SBA table. Please read all instructions before starting, and make Backups that you can revert to if you have problems. Instructions are provided with the Plug-in download, if you have suggestions to make them better please post them here and we will try to add your suggestions to future releases.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
That is great news thanks for taking the time.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Something strange is happening and I cannot find the answer in any of my searches. Have been building a new Zen Cart (v1.5.1) site using Stock by Attributes (the new version by potteryhouse). Everything was working fine, but shortly after moving the site to the actual server the Products with Attributes Stock isn't working. When I click on the menu option under Catelog I get the list of the products with attributes and I can click "Add Quantity For Product Variant" or "Edit Quantity" and see the product attribute (size), but when I make any change and click "Submit" I immediately get an error page "The connection was reset. The connection to the server was reset while the page was loading."
I don't think this is connected to moving to the new server because someone has been able to add some inventory numbers since the move.
Any ideas. I'm rather desperate. Really need to get this site up and running. The site is at www.cocoroots.com/cart
Thanks,
Greg
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
SBA is coming up with the following error when attempting to update quantities via 'Edit Quantity':
"No data received
Unable to load the webpage because the server sent no data.
Reload this webpage.
Press the reload button to resubmit the data needed to load the page.
Error code: ERR_EMPTY_RESPONSE"
Any ideas? It is able to update quantities on the main screen by directly inputting the number, but this is not working for my new stock!
Urgently need to get this sorted in order to get stuff sold by Christmas...!
Huge thanks, people!
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Hi Greg.
Did you find a fix for this yet? I've been having the same issue too for about a week now. I'm also using v1.5.1. Everything else works fine. The funny thing is though, that when when I select the "Products with Attributes Stock (aka SBA)" option, it then says shows the heading of the page to be "Stock By Attribute (SBA) Stock Page Version 1.5.2". So is there a compatibility problem because the site is 1.5.1 but it's saying that particular page is 1.5.2?
Thanks.
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5+
Hi,
I'm testing SBA 1.5.2 (upgrade from 1.5.0) on ZC 1.5.1, and am grateful for the fact that available stock appears in the cart for products both with and without attributes. However, I'm having trouble with miscalculated stock for products with attributes. It's probably just a setting somewhere that I need to change, but can't figure out which one. Here's the situation:
I have ukuleles that can be purchased with or without optional gig bags. In my test, I use 2 ukes of the same model. The desired behavior is: if someone orders 1 or 2 ukes (both with bags OR both without bags OR 1 with and 1 without), they should NOT get an insufficient stock message. If someone tries to buy 3 or more ukes (with or without bags), they SHOULD get the insufficient stock message. Currently, the system somehow thinks that I have 2 ukes with bags and 2 separate ukes without bags, so someone can put 2 ukes with bags and 2 without in their cart and not get the low stock warning, though they should. What am I doing wrong?
Here's how I have the uke set up:
- the gig bag attribute type is check box
- quantity of the product is set to 2
- qty of attribute is 2 (when it was 0, I was getting low stock msg even when ordering 1 uke with bag, and available qty was blank, not even 0)
- in Configuration->Stock, "SBA Show Available Stock Level in Cart (when less than order)" is set to true, the other SBA items are set to false.
I'll appreciate your guidance.... Thank you!
Magz
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Hi Greg.
Did you find a fix for this yet? I've been having the same issue too for about a week now. I'm also using v1.5.1. Everything else works fine. The funny thing is though, that when when I select the "Products with Attributes Stock (aka SBA)" option, it then says shows the heading of the page to be "Stock By Attribute (SBA) Stock Page Version 1.5.2". So is there a compatibility problem because the site is 1.5.1 but it's saying that particular page is 1.5.2?
Thanks.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
Lunny
Hi Greg.
Did you find a fix for this yet? I've been having the same issue too for about a week now. I'm also using v1.5.1. Everything else works fine. The funny thing is though, that when when I select the "Products with Attributes Stock (aka SBA)" option, it then says shows the heading of the page to be "Stock By Attribute (SBA) Stock Page Version 1.5.2". So is there a compatibility problem because the site is 1.5.1 but it's saying that particular page is 1.5.2?
Thanks.
FYI.. post bumping or duplicating your posts is very much frowned upon.. if no one has responded to your post it may be that people are busy where they don't have an answer..
also a posting tip for you it always helps if you quote the post you're responding to.. otherwise it's very hard to tell what problem you are also having..
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
Lunny
Hi Greg.
Did you find a fix for this yet? I've been having the same issue too for about a week now. I'm also using v1.5.1. Everything else works fine. The funny thing is though, that when when I select the "Products with Attributes Stock (aka SBA)" option, it then says shows the heading of the page to be "Stock By Attribute (SBA) Stock Page Version 1.5.2". So is there a compatibility problem because the site is 1.5.1 but it's saying that particular page is 1.5.2?
Thanks.
Hi,
The SBA Mod version 1.5.2 was written for Zen Cart 1.5.1, the version 1.5.2 was used to indicated a MAJOR or Significant change. In this case the mod version 1.5.2 now supports a "Custom ID" field. But, to use this new mod and new field there was a change to the SBA Table, thus if you have not, you should run the
Code:
- Full/Upgrade DB Install
- Full, makes all script changes to the database (DB) (i.e., adds new SBA table, adds entries into the Admin page, and new entries into the Configuration file).
- Upgrade, updates Configuration file and the SBA table as needed. If run again, it will "Clean" table entries and reapply the settings, it will not affect current data in the "products_with_attributes_stock" table.
This will add the new field to the database, based on the testing I just conducted I suspect those having problems with 1.5.2 have not run this script or that for some reason it has not added the new field.
Code:
`customid` VARCHAR(255) NULL DEFAULT NULL,
Have you run this script to "Update" the database table?
Do you have this new field in the database table for SBA?
FYI, I was on vacation and could not help as I did not have access to a test environment.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
palafirst
Something strange is happening and I cannot find the answer in any of my searches. Have been building a new Zen Cart (v1.5.1) site using Stock by Attributes (the new version by potteryhouse). Everything was working fine, but shortly after moving the site to the actual server the Products with Attributes Stock isn't working. When I click on the menu option under Catelog I get the list of the products with attributes and I can click "
Add Quantity For Product Variant" or "Edit Quantity" and see the product attribute (size), but when I make any change and click "Submit" I immediately get an error page "The connection was reset. The connection to the server was reset while the page was loading."
I don't think this is connected to moving to the new server because someone has been able to add some inventory numbers since the move.
Any ideas. I'm rather desperate. Really need to get this site up and running. The site is at
www.cocoroots.com/cart
Thanks,
Greg
THE PLOT THICKENS...
PotteryHouse has been trying to help me with this issue and it looks like it could be something with the fact that the site is hosted on GoDaddy. I installed the identical site on BlueHost and it works fine. Anyone else having this problem? Anyone come up with a solution? To help here is what PotteryHouse has written me about this:
BEGINNING OF MESSAGE: I suspect that GoDaddy has some base site configuration issue, since the same files worked fine for you on Bluehost, Also, I use both bluehost and hostmonster (they are the same company just different brand manning, and for the most part same servers)
Things to check to compare GoDaddy and Bluehost I think would be the htaccesss files, the version of PHP used, and the versions of the MySQL databases.
Any of these may cause issues if too new or too old. as a note, the Zen Cart team recently released a Beta version of Zen Cart 1.5.2 that is to address issues with PHP 5.4 and 5.5, this is a first step to the next major release of Zen Cart 1.6.
Anyway the log error foreach() sounds to me to be a PHP version issue, on bluehost and hostmonster you can add a line in the htaccess file to specify which version of PHP to use. GoDaddy may also support this, but I do not know for sure since I have never used them. END OF MESSAGE
The error message he refers to is: PHP Warning: Invalid argument supplied for foreach() in /home/content/15/7409315/html/cart/zcadmin/products_with_attributes_stock.php on line 414
I do not know if this error is the real problem since I've tried testing this problem several times today and there have been no new errors logged.
Thanks in advance for any assistance. This one is starting to hurt.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Installed on 1.3.9h all files uploaded after sql successful upload but now getting following error message on product detail page
1146 Table 'freshhea_zc1.zen_zen_products_with_attributes_stock' doesn't exist
in:
[SELECT quantity FROM zen_zen_products_with_attributes_stock AS a LEFT JOIN zen_products_attributes AS b ON (b.options_id=2 AND b.options_values_id=2) WHERE a.products_id = '58' AND a.stock_attributes = b.products_attributes_id AND a.quantity > 0 order by b.products_options_sort_order]
Any idea how to fix this or uninstall this module?
Thanks
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
jsarwar
Installed on 1.3.9h all files uploaded after sql successful upload but now getting following error message on product detail page
1146 Table 'freshhea_zc1.zen_zen_products_with_attributes_stock' doesn't exist
in:
[SELECT quantity FROM zen_zen_products_with_attributes_stock AS a LEFT JOIN zen_products_attributes AS b ON (b.options_id=2 AND b.options_values_id=2) WHERE a.products_id = '58' AND a.stock_attributes = b.products_attributes_id AND a.quantity > 0 order by b.products_options_sort_order]
Any idea how to fix this or uninstall this module?
Thanks
Hi,
For Zen Cart version 1.3.X you should have installed "Stock by Attributes - Version: 1.4.14" this is noted on the plugin page, each SBA version indicates what version of Zen Cart it will support.
If you have version 1.4.14 than the removal is to delete the files you added for this mod, in the case of files you updated / merged, replace them with the backup copies you (I hope you made) have. The changes to the database should not affect anything once those files are reverted, they can just be left alone.
If you installed the SBA version 1.5.x than you do basically the same thing as above, with the exception, the 1.5.x version has a script to remove the database changes the versions 1.5.1.2 and 1.5.2 have the script available from the "Configuration -> Products with Attributes Stock (aka SBA) Setup", read the provided instructions from the download, it explains the removal.
If you have suggestions for improvement please let us know and we can update the instructions.
-
1 Attachment(s)
Quantities of items with attributes are incorrect, how to fix?
Hi,
I'm testing SBA 1.5.2 (upgrade from 1.5.0) on ZC 1.5.1, and am grateful for the fact that available stock appears in the cart for products both with and without attributes. However, I'm having trouble with miscalculated stock for products with attributes. It's probably just a setting somewhere that I need to change, but can't figure out which one. Here's the situation:
I have ukuleles that can be purchased with or without optional gig bags. In my test, I use 2 ukes of the same model. The desired behavior is: if someone orders 1 or 2 ukes (both with bags OR both without bags OR 1 with and 1 without), they should NOT get an insufficient stock message. If someone tries to buy 3 or more ukes (with or without bags), they SHOULD get the insufficient stock message. Currently, the system somehow thinks that I have 2 ukes with bags and 2 separate ukes without bags, so someone can put 2 ukes with bags and 2 without in their cart and not get the low stock warning, though they should. What am I doing wrong?
Here's how I have the uke set up:
- the gig bag attribute type is check box
- quantity of the product (on product setup page) is set to 2
- qty of attribute is 2 (when it was 0, I was getting low stock msg even when ordering 1 uke with bag, and available qty was blank, not even 0)
- in Configuration->Stock, "SBA Show Available Stock Level in Cart (when less than order)" is set to true, the other SBA items are set to false.
- settings in attributes controller:
Attachment 13519
I'll appreciate your guidance.... Thank you!
Magz
PS- sorry for this duplicate post, I didn't know before that I could change the subject and I think my msg from Dec 1 drowned in the flood and went unnoticed...
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
I installed the correct version. I was able to get this corrected.
Thanks
-
Re: Quantities of items with attributes are incorrect, how to fix?
Quote:
Originally Posted by
magz
Hi,
I'm testing SBA 1.5.2 (upgrade from 1.5.0) on ZC 1.5.1, and am grateful for the fact that available stock appears in the cart for products both with and without attributes. However, I'm having trouble with miscalculated stock for products with attributes. It's probably just a setting somewhere that I need to change, but can't figure out which one. Here's the situation:
I have ukuleles that can be purchased with or without optional gig bags. In my test, I use 2 ukes of the same model. The desired behavior is: if someone orders 1 or 2 ukes (both with bags OR both without bags OR 1 with and 1 without), they should NOT get an insufficient stock message. If someone tries to buy 3 or more ukes (with or without bags), they SHOULD get the insufficient stock message. Currently, the system somehow thinks that I have 2 ukes with bags and 2 separate ukes without bags, so someone can put 2 ukes with bags and 2 without in their cart and not get the low stock warning, though they should. What am I doing wrong?
Here's how I have the uke set up:
- the gig bag attribute type is check box
- quantity of the product (on product setup page) is set to 2
- qty of attribute is 2 (when it was 0, I was getting low stock msg even when ordering 1 uke with bag, and available qty was blank, not even 0)
- in Configuration->Stock, "SBA Show Available Stock Level in Cart (when less than order)" is set to true, the other SBA items are set to false.
- settings in attributes controller:
Attachment 13519
I'll appreciate your guidance.... Thank you!
Magz
PS- sorry for this duplicate post, I didn't know before that I could change the subject and I think my msg from Dec 1 drowned in the flood and went unnoticed...
Can you provide a screen shot of the product setup in the SBA stock page, this may help in understanding the issues cause.
I will attempt to duplicate your settings this weekend and see what I find.
-
2 Attachment(s)
Re: Quantities of items with attributes are incorrect, how to fix?
Quote:
Originally Posted by
potteryhouse
Can you provide a screen shot of the product setup in the SBA stock page, this may help in understanding the issues cause.
I will attempt to duplicate your settings this weekend and see what I find.
Thanks, Potteryhouse, here are the shots:
Attachment 13525
Above quantities are NOT synchronized. Syncing changes total # to 4.
Attachment 13526
If you'd like to see this in action, the test product is at http://test.allstringsnylon.info/cordoba-ukulele-15sm .
Thanks for all your work!
Magz
-
Re: Quantities of items with attributes are incorrect, how to fix?
Ok, I may have missed something but, if the quantity amount for an attribute isn't filled in, is this treated as a zero quantity of stock or an infinite quantity of stock
-
Re: Quantities of items with attributes are incorrect, how to fix?
I think it shows out of stock with quantity of zero.
-
Re: Quantities of items with attributes are incorrect, how to fix?
Quote:
Originally Posted by
nigelt74
Ok, I may have missed something but, if the quantity amount for an attribute isn't filled in, is this treated as a zero quantity of stock or an infinite quantity of stock
The way I updated the code it should do the following:
Option A: Product with no associated attributes, this uses the qty assigned to the product in the catalog.
Option B: Product with Attribute(s), If no attribute is created in the SBA Stock page, this will use the qty from the product catalog.
Option C: Product with Attribute(s), and attributes are created in the SBA stock page, this uses the qty from the SBA Stock page.
In all cases,
if the qty is zero, than the flag is set to indicate out of stock.
if the qty is less than the order requested in the cart, than the flag will indicate low stock.
The flag display is based on the settings in the "Configuration -> Stock" (Check Stock Level = true)
There seems to be other configurations to support:
1. Where the base product is to use the quantity in the catalog, and there is an "Optional" attribute to add something like a "Gig Bag".
2. Where the same product is added to the cart, but one has a selected attribute combination as A,B,C, and the second entry for the same product has attribute combinations A,C. etc. These do not properly cross check the other attributes of the same product to test for available qty.
Since I had not considered these configurations, the qty calculations in the cart may not work as expected.
I will look at an update and will post for others to test if I can resolve these.
If there are other configurations I did not account for please provide the configuration scenarios, with some expected results and explanations to help with understanding what you are looking for as a result. Since I am doing this in my spare time, the update may take some time.
Additionally, as a note, the SBA versions in the Plug-ins, to-date support one attribute per row (Stock ID) in the SBA Stock page.
The new test version I posted supports attribute combinations i.e., two or more attributes per row (Stock ID) in the SBA Stock page.
I posting an updated version of this below and would like some feedback, looking for errors, etc.
I believe this version resolves some errors on web hosts that do not permit the PHP eval() command.
New Test version Attachment 13535
-
Re: Quantities of items with attributes are incorrect, how to fix?
Quote:
Originally Posted by
magz
It is looking like the code needs to be updated to support your configuration scenario, I will give it a try and let you know.
-
Re: Quantities of items with attributes are incorrect, how to fix?
Quote:
Originally Posted by
potteryhouse
It is looking like the code needs to be updated to support your configuration scenario, I will give it a try and let you know.
Thanks Potteryhouse, I do appreciate!
Magz
-
1 Attachment(s)
Re: Quantities of items with attributes are incorrect, how to fix?
Quote:
Originally Posted by
magz
Thanks Potteryhouse, I do appreciate!
Magz
Hi,
This took much longer than I thought, but I think it resolves most of the duplicate product issues you identified.
It is not perfect, but much better I think than it was.
It is a big change so you should try this on a test machine before trying on any production site.
Verify everything works as you want. No guarantees, but I hope it will work for you.
A note, for products that have attributes, you must have "None" or "All" of the products attributes setup in the SBA Stock page, it will not work if you only put one attribute in the stock page but there are others for the product.
Also, the "Attributes Controller" for the "Uke" product should be set like I have in the attached image sample.
Attachment 13601
Attachment 13600
If you find other things or have suggestion please post them.
-
Re: Quantities of items with attributes are incorrect, how to fix?
Thank you, Potteryhouse! Nothing wrong with how long it took, we're all busy and you're doing this with no pay so those of us who don't know the first thing about coding can have functional ecommerce websites... I do appreciate all the time and effort you and many others are putting into Zen-Cart and its plugins, and hope to be able to send out lots of donations sometime soon.
The update seems to be functioning fine (done very limited testing so far), except it now doesn't say what the available quantity is. Unless it's a quick and easy fix, I can live with that until the "perfect" version is released. :smile: I'm also noticing a few "cosmetic" issues... Although I set sort order of "base" to 1 and "add" to 2 and in Attributes Controller they do appear in that order, on the product page and in the shopping cart, "add" is first and "base" second. Short of numbering them, how do I force them to display in the desired order? Also on the product page, the vertical space between the 2 attributes is quite large and the text doesn't align vertically with the checkbox. How do I fix that?
Thank you!
Magz
Quote:
Originally Posted by
potteryhouse
Hi,
This took much longer than I thought, but I think it resolves most of the duplicate product issues you identified.
It is not perfect, but much better I think than it was.
It is a big change so you should try this on a test machine before trying on any production site.
Verify everything works as you want. No guarantees, but I hope it will work for you.
A note, for products that have attributes, you must have "None" or "All" of the products attributes setup in the SBA Stock page, it will not work if you only put one attribute in the stock page but there are others for the product.
Also, the "Attributes Controller" for the "Uke" product should be set like I have in the attached image sample.
Attachment 13601
Attachment 13600
If you find other things or have suggestion please post them.
-
Re: Quantities of items with attributes are incorrect, how to fix?
Quote:
Originally Posted by
magz
Thank you, Potteryhouse! Nothing wrong with how long it took, we're all busy and you're doing this with no pay so those of us who don't know the first thing about coding can have functional ecommerce websites... I do appreciate all the time and effort you and many others are putting into Zen-Cart and its plugins, and hope to be able to send out lots of donations sometime soon.
The update seems to be functioning fine (done very limited testing so far), except it now doesn't say what the available quantity is. Unless it's a quick and easy fix, I can live with that until the "perfect" version is released. :smile: I'm also noticing a few "cosmetic" issues... Although I set sort order of "base" to 1 and "add" to 2 and in Attributes Controller they do appear in that order, on the product page and in the shopping cart, "add" is first and "base" second. Short of numbering them, how do I force them to display in the desired order? Also on the product page, the vertical space between the 2 attributes is quite large and the text doesn't align vertically with the checkbox. How do I fix that?
Thank you!
Magz
(1) The qty display on the page was not changes, you will need to turn it back on in the "Configuration -> Stock" page in admin.
When you run the installation script it resets all the display flags to false.
(2) You control the Option order by the setting the applicable "Sort Order" in the "Catalog ->Options Name Manager" Product Options page in admin.
(3) I think the layout alignment you mentioned is a template thing you will have to adjust to make it look as you need, the file to work with is:
\includes\templates\YOURTEMPLATE\templates\tpl_product_info_display.php
-
Re: Quantities of items with attributes are incorrect, how to fix?
Thanks Potteryhouse!
I should have known re #1, oops; that's working well now. I did set the sort order via Options Name Manager, but it's trying to alphabetize them instead. I just changed the names so their alpha order matches the order in which I want them to appear. Found the css styles that control the labels and was able to get them to look more or less the way I want.
Take care, have a wonderful New Year!
Magz
Quote:
Originally Posted by
potteryhouse
(1) The qty display on the page was not changes, you will need to turn it back on in the "Configuration -> Stock" page in admin.
When you run the installation script it resets all the display flags to false.
(2) You control the Option order by the setting the applicable "Sort Order" in the "Catalog ->Options Name Manager" Product Options page in admin.
(3) I think the layout alignment you mentioned is a template thing you will have to adjust to make it look as you need, the file to work with is:
\includes\templates\YOURTEMPLATE\templates\tpl_product_info_display.php
-
1 Attachment(s)
Attribute drop-downs showing html as well as price differential
I am running Zen Cart v1.5.1 and just installed Stock by Attribute v1.5.2 and now my attribute selection drop-downs contain html as well as the price differential. See pic:
Attachment 13638
I have not seen anything about this error in this thread. How do I fix this?
Mal
-
Re: Attribute drop-downs showing html as well as price differential
Quote:
Originally Posted by
Malaperth
I am running Zen Cart v1.5.1 and just installed Stock by Attribute v1.5.2 and now my attribute selection drop-downs contain html as well as the price differential. See pic:
Attachment 13638
I have not seen anything about this error in this thread. How do I fix this?
Mal
This was noticed previously, and is fixed in the new version under TEST.
I would like to get more feed back before posting to the plugins.
In the mean time, you can use the guidance here:
http://www.zen-cart.com/showthread.p...37#post1225837
or the new test version:
http://www.zen-cart.com/showthread.p...02#post1231102
Let us know how it works for you.
-
Re: Attribute drop-downs showing html as well as price differential
Quote:
Originally Posted by
potteryhouse
The programatic fix in attributes.php worked fine, thank you very much! And thank you for making/updating/fixing this plugin, it is a lifesaver!
The link to your new version does not work, however and I would be more than happy to try it if I can get it.
Also, I am having another problem although I can't say for sure it has to do with Stock by Attribute, but it did not show up until I installed it. Every product I have that has attributes and claims to set the quantity to 1 says out of stock when added to the shopping cart. In the product definition page, it says quantity 1 and lists quantity 1 on the page shown to the public. I did notice something odd when I initially added the attributes. It changed the quantity to 1+eo6 I believe it was and that was what was initially displayed. Sorry, but I'm old and may be a bit senile, but I can't remember if I changed the amount manually or it changed while editing the product again. However, I cannot get the product to add to the shopping cart without the out of stock error. And, what's worse, I can't even remember what/where I looked to attempt to fix it. I know I didn't change anything, just searching.
Mal
-
Re: Attribute drop-downs showing html as well as price differential
Quote:
Originally Posted by
Malaperth
The programatic fix in attributes.php worked fine, thank you very much! And thank you for making/updating/fixing this plugin, it is a lifesaver!
The link to your new version does not work, however and I would be more than happy to try it if I can get it.
Also, I am having another problem although I can't say for sure it has to do with Stock by Attribute, but it did not show up until I installed it. Every product I have that has attributes and claims to set the quantity to 1 says out of stock when added to the shopping cart. In the product definition page, it says quantity 1 and lists quantity 1 on the page shown to the public. I did notice something odd when I initially added the attributes. It changed the quantity to 1+eo6 I believe it was and that was what was initially displayed. Sorry, but I'm old and may be a bit senile, but I can't remember if I changed the amount manually or it changed while editing the product again. However, I cannot get the product to add to the shopping cart without the out of stock error. And, what's worse, I can't even remember what/where I looked to attempt to fix it. I know I didn't change anything, just searching.
Mal
This link will bring you to the post that has the file to download (Post 1790):
http://www.zen-cart.com/showthread.p...02#post1231102
The file name / download is:
stock_by_attribute_1.5.X_TEST_3.zip
There are a number of changes, some of them affect the very thing you described above, the out of stock issue "might" be related to how you entered the products in the SBA stock page. this version under test handles many variations of product entries, but since it is a test version I suggest you try it before adding too many products.
You can turn off the out of stock warning in the "configuration -> stock" page, it is one of the switches, the switches are explained in the instructions provided with the version 1.5.2.
-
Re: Attribute drop-downs showing html as well as price differential
Quote:
Originally Posted by
potteryhouse
This link will bring you to the post that has the file to download (Post 1790):
http://www.zen-cart.com/showthread.p...02#post1231102
The file name / download is:
stock_by_attribute_1.5.X_TEST_3.zip
There are a number of changes, some of them affect the very thing you described above, the out of stock issue "might" be related to how you entered the products in the SBA stock page. this version under test handles many variations of product entries, but since it is a test version I suggest you try it before adding too many products.
You can turn off the out of stock warning in the "configuration -> stock" page, it is one of the switches, the switches are explained in the instructions provided with the version 1.5.2.
I'm using IE9, and I'm assuming it's another wonderful "feature" of another wonderful Microsoft product (which I consider viruses, but I'm a bloody sheep and use it) and when I click on either of those links I am brought to literally a blank page. The page is so blank, I can't even right-click on it to view source... I love my life... I'll try another browser and see what happens...
Mal
-
Re: Attribute drop-downs showing html as well as price differential
Quote:
Originally Posted by
Malaperth
I'm using IE9, and I'm assuming it's another wonderful "feature" of another wonderful Microsoft product (which I consider viruses, but I'm a bloody sheep and use it) and when I click on either of those links I am brought to literally a blank page. The page is so blank, I can't even right-click on it to view source... I love my life... I'll try another browser and see what happens...
Mal
I was able to download the zip with Google Chrome, but now Windows Vista claims it doesn't know what to do with a zip file. Again... I love my life... Time for a reboot and maybe a Military grade disk wipe and complete reinstall. I LOVE MY LIFE!!!
Thank you very much for your efforts to this community. I only wish I could remember half of the things I used to know so I could contribute something more than whining about issues that I should be able to fix by myself, but alas, my mind has failed me as my body has and I'm rather useless except that I can spell PHP. Other than that, I'm pretty much a lesion on society.
I will install the new files and hopefully do it correctly and not leave any 'leftovers' to cause issues. Thanks again for helping me I really appreciate it!
Mal
-
Re: Attribute drop-downs showing html as well as price differential
Quote:
Originally Posted by
Malaperth
I was able to download the zip with Google Chrome, but now Windows Vista claims it doesn't know what to do with a zip file. Again... I love my life... Time for a reboot and maybe a Military grade disk wipe and complete reinstall. I LOVE MY LIFE!!!
Thank you very much for your efforts to this community. I only wish I could remember half of the things I used to know so I could contribute something more than whining about issues that I should be able to fix by myself, but alas, my mind has failed me as my body has and I'm rather useless except that I can spell PHP. Other than that, I'm pretty much a lesion on society.
I will install the new files and hopefully do it correctly and not leave any 'leftovers' to cause issues. Thanks again for helping me I really appreciate it!
Mal
Reading between the lines, it sounds to me you know much more than you let on!
Windows Vista was a bit of a pain... I use 7-Zip on all my PCs to deal with zip files, it works well for me.
http://www.7-zip.org
I also use Beyond Compare to merge files and look at differences, just in case you need something like that, you could also look at winmerge.
http://www.scootersoftware.com
http://winmerge.org
-
Re: Attribute drop-downs showing html as well as price differential
Quote:
Originally Posted by
potteryhouse
Reading between the lines, it sounds to me you know much more than you let on!
Windows Vista was a bit of a pain... I use 7-Zip on all my PCs to deal with zip files, it works well for me.
http://www.7-zip.org
I also use Beyond Compare to merge files and look at differences, just in case you need something like that, you could also look at winmerge.
http://www.scootersoftware.com
http://winmerge.org
Everything was fine once I actually rebooted this Winblows pig and cleared whatever program is causing the memory leak (still can't identify it yet). I have a compare program, but I don't think it merges, so I will take a look at the scootersoftware prog. Anything with 'win' in it makes my sphincter tighten beyond normal so I try to avoid them. :yuck: :P
Again, I appreciate all the effort you are puttin into this for free. I tried Magento because it was recommended by my hosting provider as a 'user friendly, easy to set up, free full ecommerce platform'. Other than 'full ecommerce platform' the rest is horse hockey... It's about as user friendly as poison ivy in your shorts. It took me two months of agony and multi-multiple calls to tech support just to find out that in order to make my site work, the tech people would have to rewrite my entire theme installation along with many core files. Magento is a bloated piece of garbage that I'm surprised that eBay allows to stay alive (well except if you buy the Enterprise edition, then they bend over backwards to help you and you get a separate version without all the hundreds of literally duplicated files located in about 30 different places in the code). I found Zen Cart, and in a few days had damn near a fully functional ecommerce site. The things that were lacking were things that needed to be produce on our end (product images, text for various items and pages etc), but Zen Cart should be called God Cart or something like that. Well, enough babbling from an old fool. I got a LOT more than I paid for (yup, that's right, NOTHING) when I found Zen Cart. It's the best thing I've found since my wife! Ok... I'm gonna shut up now...
Mal
-
SBA Version 1.5.3
I am putting together the next version (based on the test version I posted in this forum) to be provided to the "Plug-Ins".
Is there anyone available that can do the translation that can be included as samples?
I would like to get the following translated into a couple other languages, French, Dutch, etc.
Just the text in the defines below: after the comma, in the single quotes.
Thanks in advance.
This is used in the Admin:
Code:
define('PWA_DELETE_VARIANT_CONFIRMATION', 'Are you sure you want to delete this product variant?');
define('PWA_PRODUCT_ID', 'Product ID');
define('PWA_PRODUCT_NAME', 'Product Name');
define('PWA_PRODUCT_IMAGE', 'Image');
define('PWA_PRODUCT_MODEL', 'Product Model');
define('PWA_QUANTITY', 'Quantity: ');
define('PWA_QUANTITY_FOR_ALL_VARIANTS', 'Quantity for all variants');
define('PWA_ADD_QUANTITY', 'Add Quantity For Product Variant');
define('PWA_SYNC_QUANTITY', 'Sync Quantities');
define('PWA_EDIT_QUANTITY', 'Edit Quantity');
define('PWA_DELETE_VARIANT', 'Delete Variant');
define('PWA_STOCK_ID', 'Stock ID');
define('PWA_VARIANT', 'Variant');
define('PWA_QUANTITY_IN_STOCK', 'Quantity in Stock');
define('PWA_SORT_ORDER', 'Sort Order');
define('PWA_CUSTOM_ID', 'Custom ID');
define('PWA_CUSTOMID_NAME', ' Item # ');
define('PWA_EDIT', 'Edit');
define('PWA_DELETE', 'Delete');
define('PWA_SUBMIT','Submit');
This is used in the Admin:
Code:
define('BOX_CATALOG_PRODUCTS_WITH_ATTRIBUTES_STOCK', 'Products with Attributes Stock (aka SBA)');
define('BOX_CONFIGURATION_PRODUCTS_WITH_ATTRIBUTES_STOCK_SETUP', 'Products with Attributes Stock (aka SBA) Setup');
This is used in the Store front end:
Code:
define('PWA_STOCK_AVAILABLE', ' Available Stock: ');
define('PWA_OUT_OF_STOCK', ' Out of Stock: ');
define('PWA_STOCK_QTY', ' Qty: ');
define('PWA_LOW_STOCK', ' Low Stock! ');
define('PWA_CUSTOMID_NAME', ' Item # ');