Zen Cart Logo
Forums / All Other Contributions/Addons / Stock by Attribute v4.0 addon for v1.3.5-1.3.9

Stock by Attribute v4.0 addon for v1.3.5-1.3.9

Views: 658,741

Results 201 to 220 of 3,609
8 May 2007, 10:13 AM
#201
acetate avatar

acetate

New Zenner

Join Date:
Feb 2006
Posts:
31
Plugin Contributions:
0

Stock by Attribute v4.0 addon for v1.3.5-1.3.9

Found it:
http://www.zen-cart.com/forum/showthread.php?t=25987&page=11

It details code that displays the actual stock amounts for each attribute next to the attribute name. Want to mod my site to create a custom stock level chart - this post is a good place for me to start. Cheers.

9 May 2007, 2:21 PM
#202
pacorl2 avatar

pacorl2

New Zenner

Join Date:
May 2007
Posts:
3
Plugin Contributions:
0

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

acetate:

Found it:
http://www.zen-cart.com/forum/showthread.php?t=25987&page=11

It details code that displays the actual stock amounts for each attribute next to the attribute name. Want to mod my site to create a custom stock level chart - this post is a good place for me to start. Cheers.

There are no version for zencart 1.3.7 ? . I have no the includes/modules/pages/product_info/main_template_vars_attributes.php file in zencart 137 with stock by attributes 4.4

Any idea?. Thanks.

9 May 2007, 8:24 PM
#203
woodlandsprite avatar

woodlandsprite

Zen Follower

Join Date:
May 2006
Posts:
307
Plugin Contributions:
0

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

pacorl2:

There are no version for zencart 1.3.7 ? . I have no the includes/modules/pages/product_info/main_template_vars_attributes.php file in zencart 137 with stock by attributes 4.4

Any idea?. Thanks.

http://www.zen-cart.com/forum/showthread.php?p=227204#post227204

10 May 2007, 11:45 AM
#204
pacorl2 avatar

pacorl2

New Zenner

Join Date:
May 2007
Posts:
3
Plugin Contributions:
0

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

woodlandsprite:

http://www.zen-cart.com/forum/showthread.php?p=227204#post227204

Thank you, but after three hours wasted, it don't works to me :cry:. The steps I'm doing is:

  • Install zencart 1.3.7
  • Install stock by attributes 4.3 by kuroi

At this point all works ok.

Modify includes/modules/your template/attributes.php (my template is "classic"), instead of /modules/pages/product_info/main_template_vars_attributes.php that is not present in zencart 1.3.7
with the grayson mod:
http://www.zen-cart.com/forum/showthread.php?t=25987&page=11

And I can't see any change. It appears the attribs, with the total number in stock, but without detailing sizes in the dropdown list (M 2 units , XL 3 units, etc.)

10 May 2007, 11:58 AM
#205
kuroi avatar

kuroi

Totally Zenned

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

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

For Zen Cart 1.3.7 you should use Stock by Attributes 4.4 rather than 4.3 (which was for 1.3.6).

The Grayson solution is quite old now and has limited applicability. To make it work in 1.3.7 you should also review the steps recommended in post 46 of this thread.

I've not tried this myself, but several other people appear to have it working.

11 May 2007, 10:15 AM
#206
pacorl2 avatar

pacorl2

New Zenner

Join Date:
May 2007
Posts:
3
Plugin Contributions:
0

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

kuroi:

For Zen Cart 1.3.7 you should use Stock by Attributes 4.4 rather than 4.3 (which was for 1.3.6).

I am using 4.4 , but in the readme file apeears "stock by attributes v4.3". It confused me, but it's an error in the readme file.

kuroi:

The Grayson solution is quite old now and has limited applicability. To make it work in 1.3.7 you should also review the steps recommended in post 46 of this thread.

I've not tried this myself, but several other people appear to have it working.

Thank you very much, it works OK :clap:

It's a mess this kind of large threads with a lot of conversations, versions, and mods about one thing :wacko: (all oscommerce and zencart are very messy, I use a lot phbpbb for example, and its very clean and simple the updates, but with oscommerce/zencart... uffff)

11 May 2007, 6:38 PM
#207
seattleannie avatar

seattleannie

Zen Follower

Join Date:
Oct 2005
Posts:
151
Plugin Contributions:
0

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

Hi,

My client is running a shop with ZC v1.3.7 and Stock by Attributes v4.3.1. All has been fine for several months. But suddenly, it is showing items as out of stock that are not out of stock. In fact, 998 are in stock. I re-uploaded all the Stock by Attributes v4.3.1 files, in case something had gotten corrupted on the server. No change - the problem persists. Has anyone else had this problem? Is there a fix??

Thanks!

~anne

13 May 2007, 1:39 AM
#208
vivaraquel avatar

vivaraquel

Zen Follower

Join Date:
Sep 2004
Location:
Australia
Posts:
305
Plugin Contributions:
0

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

Ever since I installed this I been getting this kinda message when i delete products from my catalog. I hit the back button and cancel and it deletes products. But now I got it when trying to delete a sub category and it won't let me. Any ideas where I gotta fix it? The message is as follows:

1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(products_attributes_id, products_id, options_id, options_values_id, options_val' at line 1
in:
[delete from zen_products_attributes (products_attributes_id, products_id, options_id, options_values_id, options_values_price, price_prefix, products_options_sort_order, product_attribute_is_free, products_attributes_weight, products_attributes_weight_prefix, attributes_display_only, attributes_default, attributes_discounted, attributes_image, attributes_price_base_included, attributes_price_onetime, attributes_price_factor, attributes_price_factor_offset, attributes_price_factor_onetime, attributes_price_factor_onetime_offset, attributes_qty_prices, attributes_qty_prices_onetime, attributes_price_words, attributes_price_words_free, attributes_price_letters, attributes_price_letters_free, attributes_required) where products_id = '57']
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.

14 May 2007, 12:41 PM
#209
fwed avatar

fwed

New Zenner

Join Date:
May 2007
Posts:
12
Plugin Contributions:
0

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

kuroi:

For Zen Cart 1.3.7 you should use Stock by Attributes 4.4 rather than 4.3 (which was for 1.3.6).

The Grayson solution is quite old now and has limited applicability. To make it work in 1.3.7 you should also review the steps recommended in post 46 of this thread.

I've not tried this myself, but several other people appear to have it working.

Hi, this is my first post on this forum.
I am also running Zen Cart 1.3.7 and Stock by Attributes 4.4.
I managed to install it and it seemed to work fine, until I tried to checkout (when logged in)
Indeed, an error message "Fatal error: Cannot redeclare class order in order.php on line **20" **appeared on page http://www.mysite.com/index.php?main_page=checkout_shipping.

This occurs even if I try to buy an item with or without any attributes.

Does anyone know how to fix this ?

I tried to add a line prior to line 20 (as explained on wiki) :
if ( class_exists('order') )
{
return;
}

but the same error occured !

Fwed

16 May 2007, 9:32 AM
#210
fwed avatar

fwed

New Zenner

Join Date:
May 2007
Posts:
12
Plugin Contributions:
0

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

fwed:

Hi, this is my first post on this forum.
I am also running Zen Cart 1.3.7 and Stock by Attributes 4.4.
I managed to install it and it seemed to work fine, until I tried to checkout (when logged in)
Indeed, an error message "Fatal error: Cannot redeclare class order in order.php on line **20" **appeared on page http://www.mysite.com/index.php?main_page=checkout_shipping.

This occurs even if I try to buy an item with or without any attributes.

Does anyone know how to fix this ?

i have uninstalled the mod, and now I can check out.
I will try to re-install it and see what happens !

Fwed

16 May 2007, 12:05 PM
#211
fwed avatar

fwed

New Zenner

Join Date:
May 2007
Posts:
12
Plugin Contributions:
0

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

fwed:

i have uninstalled the mod, and now I can check out.
I will try to re-install it and see what happens !

Fwed

OK, I have re installed the mod as mentionned above, and it works perfectly now :clap:.

I don't know why it didn't work in the first place :blink: ! Maybe I did it more properly (i used to leave for example the new order.php file and order_OLD.php file in the same directory, maybe this is why all went wrong)

I hope this will help anyone who gets into the same error message !

Fwed

16 May 2007, 12:15 PM
#212
kuroi avatar

kuroi

Totally Zenned

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

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

fwed:

i used to leave for example the new order.php file and order_OLD.php file in the same directory, maybe this is why all went wrongYou are exactly right. Both the new and old files contained classes called order and Zen Cart would have tried to load them both, which PHP doesn't allow. It's good to keep backups of changed files, but personally I would always recommend doing so offline and not mixing them with your live files. Glad you got to the bottom of the problem.

16 May 2007, 12:18 PM
#213
kuroi avatar

kuroi

Totally Zenned

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

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

seattleannie:

My client is running a shop with ZC v1.3.7 and Stock by Attributes v4.3.1. All has been fine for several months. But suddenly, it is showing items as out of stock that are not out of stock. In fact, 998 are in stock. I re-uploaded all the Stock by Attributes v4.3.1 files, in case something had gotten corrupted on the server. No change - the problem persists. Has anyone else had this problem? Is there a fix??Have you tried upgrading to Stock by Attributes v4.4, which is the correct version when you are running ZC 1.3.7?

16 May 2007, 12:35 PM
#214
kuroi avatar

kuroi

Totally Zenned

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

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

vivaraquel:

Ever since I installed this I been getting this kinda message when i delete products from my catalog. I hit the back button and cancel and it deletes products. But now I got it when trying to delete a sub category and it won't let me. Any ideas where I gotta fix it? The message is as follows:

1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(products_attributes_id, products_id, options_id, options_values_id, options_val' at line 1
in:
[delete from zen_products_attributes (products_attributes_id, products_id, options_id, options_values_id, options_values_price, price_prefix, products_options_sort_order, product_attribute_is_free, products_attributes_weight, products_attributes_weight_prefix, attributes_display_only, attributes_default, attributes_discounted, attributes_image, attributes_price_base_included, attributes_price_onetime, attributes_price_factor, attributes_price_factor_offset, attributes_price_factor_onetime, attributes_price_factor_onetime_offset, attributes_qty_prices, attributes_qty_prices_onetime, attributes_price_words, attributes_price_words_free, attributes_price_letters, attributes_price_letters_free, attributes_required) where products_id = '57']
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.The SQL code being generated there is just plain wrong. But I have reviewed every access to the products attributes table in both core Zen Cart and Stock by Attributes and can see nothing that would generate this SQL. Do you have any other mods installed?

21 May 2007, 3:16 AM
#215
wingkong avatar

wingkong

New Zenner

Join Date:
May 2007
Posts:
5
Plugin Contributions:
0

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

Hi guys,

I'm quite new at this (never done SQL stuff before) and tried to follow the instructions to install this mod.

The instructions said to create a new database table etc by running stock_attribute.sql, but I wasn't sure how to do this. I first went to the admin tools -> Install SQL patches, and tried uploading the file. When that didn't seem to do anything, I opened the file in a text editor, copied the code, and pasted it into the SQL Query Executor. This resulted in an error.

1062 Duplicate entry 'STOCK_SHOW_LOW_IN_CART' for key 2

Undaunted, I tried copying the files into the proper folders in my offline site, and renamed the template folder name accordingly. It did create a new option in the Catalog called "Products with Attributes Stock," but when I choose it, I get another error:

Warning: main(includes/classes/products_with_attributes_stock.php): failed to open stream: No such file or directory in /home/wk/public_html/zc/admin/products_with_attributes_stock.php on line 12

Warning: main(includes/classes/products_with_attributes_stock.php): failed to open stream: No such file or directory in /home/wk/public_html/zc/admin/products_with_attributes_stock.php on line 12

Fatal error: main(): Failed opening required 'includes/classes/products_with_attributes_stock.php' (include_path='.:/usr/local/lib/php') in /home/wk/public_html/zc/admin/products_with_attributes_stock.php on line **12

**I must have done something wrong... though the file in question is indeed in the folder it mentions. Any help?

23 May 2007, 1:55 PM
#216
kuroi avatar

kuroi

Totally Zenned

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

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

Wingkong

Your first attempt to install the database patch worked. The second is failing because you can't do it twice - but you don't need to.

The warning messages that you are getting suggest that the files are not in the right places. That reference to includes/classes/products_with_attributes_stock.php is from a file located in your admin directory, so a more complete path would be admin/includes/classes/products_with_attributes_stock.php. This file is certainly in the current stock by attributes release package, but not, according to your warnings, in the right place on your server.

25 May 2007, 3:26 AM
#217
wingkong avatar

wingkong

New Zenner

Join Date:
May 2007
Posts:
5
Plugin Contributions:
0

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

kuroi:

Wingkong

Your first attempt to install the database patch worked. The second is failing because you can't do it twice - but you don't need to.

The warning messages that you are getting suggest that the files are not in the right places. That reference to includes/classes/products_with_attributes_stock.php is from a file located in your admin directory, so a more complete path would be admin/includes/classes/products_with_attributes_stock.php. This file is certainly in the current stock by attributes release package, but not, according to your warnings, in the right place on your server.

Thanks Kuroi! Sure enough, I forgot to upload the file to the admin/includes/classes folder. Works now! :)

25 May 2007, 8:27 AM
#218
blag avatar

blag

Zen Follower

Join Date:
May 2007
Location:
Leicester, England
Posts:
165
Plugin Contributions:
0

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

I didn't realise that this thread existed, so I am now posting a new 'reply' here, because it's a more appropriate location. The post is my original with a reply from Kuroi ( his replies are indicated in red italicised text)

Quote:
Originally Posted by blag [IMG]http://www.zen-cart.com/forum/images/ZCgreen/buttons/viewpost.gif[/IMG]
*I have some questions about the Stock by Attributes module, and wondered if anyone can assist, please.

Firstly: lets say I have an item with two attributes, one is colour and the other is size. Now, if I have in stock (and the stock is finite and cannot be re-stocked) 6 large, green; 4 medium, brown; and 3 small, green.

The item is showing that there are 13 items available, but let's say that one customer wanted 4 small green, and ordered them, does the module prevent him ordering four, OR does it allow the order for 4 small green items?

Are ordered items deducted from the individual attributes and the grand total or from the total only?*

Items are deducted from the stock for individual attribute combinations. Whether or not the visitor would be stopped from checking out in the example that you give above, would depend on whether you had selected that option in the switches that the Stock by Attributes mod inserts into your Admin.

Quote:
 	 		 			 				 					Originally Posted by **blag** 					[\[IMG\]http://www.zen-cart.com/forum/images/ZCgreen/buttons/viewpost.gif\[/IMG\]](http://www.zen-cart.com/forum/showthread.php?p=378961#post378961) 				
			*A further question about the module: how do I offer a discount for bulk purchase of at items? Using my example above, I want to offer a discount if the customer buys six of a specific item, thus discount would apply to a purchase of all 6 of the **large green** items, but of course, no discount will apply for the other items nor for any combination of these items that may equal or exceed 6 - the discount applies to the **6 large green items** only. (If there were **6 medium brown items**, then a discount would apply to a purchase of all six of them.) Is this possible, and if so how?*

I'm afraid that I've never used the discount facilities, let alone in tandem with Stock by Attributes. I can see ways of programming it both ways, so you would need to test it to see which way it actually works. Or you could try posting in the Stock by Attributes support thread to see if one of the mod's other users has already tried this.

So does anyone know how to implement the specific discount for bulk with a sba set-up?

	 	 		 		 		 		 		 		 			 				________________
26 May 2007, 7:31 AM
#219
blag avatar

blag

Zen Follower

Join Date:
May 2007
Location:
Leicester, England
Posts:
165
Plugin Contributions:
0

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

I have been through every post in this thread and can't see that anyone has asked the question as to what the 'Sync quantities' facility actually does. Can anyone out there advise, please?

(I don't want to try it just in case it screws up the data that I have painstakingly uploaded!!)

26 May 2007, 7:59 AM
#220
kuroi avatar

kuroi

Totally Zenned

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

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

Sync quantities applies the sum of the stocks for a product's attribute combinations to the overall stock total for that product.