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: 660,384

Results 121 to 140 of 3,609
14 Jan 2007, 1:59 PM
#121
hostilerecords avatar

hostilerecords

New Zenner

Join Date:
Dec 2006
Location:
Great Yarmouth, UK
Posts:
14
Plugin Contributions:
0

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

Hello, I have a problem with this addon.

I am using V4.31 of the addon and version 3.16 of Zencart.

I have installed it and then set up stock values for each attribute, however you can still checkout with variations which are out of stock, for example;

Army Camo Jacket
10 Total
5 Medium
5 Large

I can't checkout with more than 10, thats fine.
But I can checkout with 6 Medium.

How can I Fix this?

Stock config:
Check stock level- True
Subtract stock- True
Allow Checkout- False
Show stock when low- True

http://www.hostile-records.co.uk
Punk-Metal-Ska
Music-Clothing-Accessories

17 Jan 2007, 3:46 PM
#122
s_p_ike avatar

s_p_ike

Zen Follower

Join Date:
Feb 2005
Location:
Italy
Posts:
178
Plugin Contributions:
0

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

Hello, problem here.

ZC 1.3.7 fresh (test installation with demo data)
Stock by Attributes 4.4

Admin config:

allow checkout false
show stock when low true

I set up a product with 1 attribute (checkbox) with 3 values, assigned each of them quantity 1, so total quantity is 3.

My product:

Product Qty Minimum: 1
Product Qty Maximum: 0
Product Qty Units: 1
Product Qty Min/Unit Mix: yes

When I buy the product, if I select only 1 attribute, everything is ok. If I select 2 attributes, I obtain the low level alert and quantity available 0.

If I select 1st attribute, then go back to product page, select the second, then go back to product page and select the third, I've three products in my cart, one for each attribute and this would be ok, but selecting all the attributes in one step cause the alert to come out.

What's happening?

Unfortunately no url, just testing at office.

Paolo De Dionigi
Co-maintainer of Zen Cart Italia

17 Jan 2007, 5:12 PM
#123
s_p_ike avatar

s_p_ike

Zen Follower

Join Date:
Feb 2005
Location:
Italy
Posts:
178
Plugin Contributions:
0

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

It seems to me that there's a problem with checkbox attributes.

in functions_lookups.php

function zen_get_products_stock processes the $attributes variable passed as argument in this way:

if(is_array($attributes) and sizeof($attributes) > 0){

....

then

	$query = 'select products_attributes_id from '.TABLE_PRODUCTS_ATTRIBUTES.' '.$first_search.' and products_id="'.$products_id.'" order by products_attributes_id';
	$attributes_new = $db->Execute($query);

at this point we have an array with products_attributes_id

then

	while(!$attributes_new->EOF){
		$stock_attributes[] = $attributes_new->fields['products_attributes_id'];	
		$attributes_new->MoveNext();
	}
	if(sizeof($stock_attributes) > 1){
		$stock_attributes = implode(',',$stock_attributes);
	} else {
		$stock_attributes = $stock_attributes[0];
	}

	$stock_query = 'select quantity as products_quantity from '.TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK.' where products_id = "'.(int)$products_id.'" and stock_attributes="'.$stock_attributes.'"';

the problem is $stock_attributes = implode(',',$stock_attributes);

because this code is executed even if I selected only 2 values of the same checkbox attribute and when this occurs, $stock_attributes value is something like '14,15' but of course if they're 2 values of the same checkbox attribute they won't be stored in TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK in this way.

So the result of the last query will be 0, and the quantity will be 0- product_quantity, --> always marked as out of stock.

Ok, discovered the problem, now searching the solution. Any help is appreciated.

Paolo De Dionigi
Co-maintainer of Zen Cart Italia

18 Jan 2007, 4:11 PM
#124
s_p_ike avatar

s_p_ike

Zen Follower

Join Date:
Feb 2005
Location:
Italy
Posts:
178
Plugin Contributions:
0

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

I totally changed the approach to what I was trying to achieve: possibility to manage product with sub-products, so customers may buy the whole product or some sub-products (if bought some subproducts, then next customer would have the possibility to buy the 'whole' product but without sub-products already bought).

I achieved this by implementing some mods in categories management in admin (already heavily modified for other functionalities) and just 1 extra function and some mods in tpl_modules_product_listing.php.
Of course sub-products must have no attributes.
The 'whole' product in effect doesn't exist, it's a category containing all sub-products. But if the customer access this kind of category, he will find both products list and a "buy all available products" button which puts all products of that category in the cart (with max quantity available for each product, since this was asked to me).

For these reasons I stop working on checkbox issue.

Paolo De Dionigi
Co-maintainer of Zen Cart Italia

21 Jan 2007, 7:31 PM
#125
tbrides avatar

tbrides

Zen Follower

Join Date:
Oct 2006
Posts:
198
Plugin Contributions:
0

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

Has anybody else had any issues with this on v1.3.7. Need to know before I install it!
Thought I read somewhere that it was going to be packaged as part of 1.3.6

25 Jan 2007, 7:55 AM
#127
djdex avatar

djdex

New Zenner

Join Date:
Nov 2006
Posts:
7
Plugin Contributions:
0

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

Ok so currently i have the product installed and adding each stock you know green xl I have 1 yada yada yada. If I dont have say White XXL when someone selects the color is there a way to not show XXL in the other drop down?

25 Jan 2007, 12:39 PM
#128
beer_man avatar

beer_man

New Zenner

Join Date:
Oct 2006
Location:
United Kingdom
Posts:
48
Plugin Contributions:
0

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

Hi guys,

I have a need to control stock by attributes, but my requirement is a little different to most others in that I need to control one ‘pool’ of stock, with various attributes..

I sell grain in my shop which I buy in 25Kg sacks. My attributes are set in a drop-down so that you could by 0.25kg, 1Kg, 0.5Kg etc.

So if someone came and bought that lot, my stock level would need to show 23.75Kg left in stock based on stock from just one sack (i.e. not separate sources for each product in the drop down)

Will this module deal with this?

Cheers

25 Jan 2007, 3:15 PM
#129
tbrides avatar

tbrides

Zen Follower

Join Date:
Oct 2006
Posts:
198
Plugin Contributions:
0

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

DJDex , do u have this installed on v1.3.7, if so is everything working ok for you?

25 Jan 2007, 11:22 PM
#130
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

Beer_man:

Hi guys,

I have a need to control stock by attributes, but my requirement is a little different to most others in that I need to control one ‘pool’ of stock, with various attributes..

I sell grain in my shop which I buy in 25Kg sacks. My attributes are set in a drop-down so that you could by 0.25kg, 1Kg, 0.5Kg etc.

So if someone came and bought that lot, my stock level would need to show 23.75Kg left in stock based on stock from just one sack (i.e. not separate sources for each product in the drop down)

Will this module deal with this?

Cheers

BeerMan
Someone else may come and have a better answer, but I would set it up so people can buy by .25 kg quantities, and if you are offering a price break for higher volume, you can set it up for volume pricing.
that way if someone wants 1 kg, they purchase 4 .25kg "units"

For your total stock, you would enter the units available - I suspect that would be 100 x .25kg

Not sure if it is smart enough to do it as cleanly as you would like - I know there was someone on here a while back looking to sell bulk tea, but I don't for the life of me recall if they posted in the stock by attribute family of threads.

Good Luck to you.

Live again! http://spritelygoods.com Rebuilt on ZC v 1.5.1 from 1.3.0.2

26 Jan 2007, 12:46 PM
#131
beer_man avatar

beer_man

New Zenner

Join Date:
Oct 2006
Location:
United Kingdom
Posts:
48
Plugin Contributions:
0

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

woodlandsprite:

BeerMan
Someone else may come and have a better answer, but I would set it up so people can buy by .25 kg quantities, and if you are offering a price break for higher volume, you can set it up for volume pricing.
that way if someone wants 1 kg, they purchase 4 .25kg "units"

For your total stock, you would enter the units available - I suspect that would be 100 x .25kg

Not sure if it is smart enough to do it as cleanly as you would like - I know there was someone on here a while back looking to sell bulk tea, but I don't for the life of me recall if they posted in the stock by attribute family of threads.

Good Luck to you.

Woodlandsprite,

Thanks for taking the time to reply. What you are saying is set up the product so you buy products in decimal places, so a 'add to basket' quantity of 1.25 would get you 1.25Kg of grain.

That is great, and it solves my stock control issue too! Thanks for taking the time to reply.:D

For ref, this thread details how you set up ZC to deal with quantities being sold to a certain number of decimal places...

..http://www.zen-cart.com/forum/showthread.php?t=39561&highlight=0.1+quantity

Thanks!!

27 Jan 2007, 4:46 AM
#132
tajul_ashyqin avatar

tajul_ashyqin

Zen Follower

Join Date:
Apr 2006
Location:
Labuan Island
Posts:
362
Plugin Contributions:
1

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

DJDex:

Ok so currently i have the product installed and adding each stock you know green xl I have 1 yada yada yada. If I dont have say White XXL when someone selects the color is there a way to not show XXL in the other drop down?

no can't do...not for the time being but i think it will be handle upon the release v1.4 soon! :D

"Whether you think you can, or you think you can't... YOU ARE RIGHT."
GOOD LUCK !!!

29 Jan 2007, 11:52 PM
#133
crabacle avatar

crabacle

New Zenner

Join Date:
Apr 2005
Posts:
26
Plugin Contributions:
0

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

OK - thanks to all concerned for this mod. However, I must be thick because I cannot get it to work.

I've been a good boy and done a WinMerge with all of the affected files and copied over the changes. Also copied up all new files. Loaded SQL and . . . . . ho hum!

What is happening is the items with attributes are showing out of stock when selecting. Also the Attrributes page for the item (in site admin) has no fields for entering different stock numbers for the items.

I am sure that tis should not be so . . . .

I am also slightly convinced that its something about the template files as well (or not!!)

Can anybody help with this please? - This mod is key to my site!

(PS - rolled all of the changes back to at least have a working site).

Thanks - but PLEASE HELP!

30 Jan 2007, 3:57 AM
#134
richcon avatar

richcon

New Zenner

Join Date:
Jan 2007
Posts:
17
Plugin Contributions:
0

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

Pardon for jumping in here, but I've got a question about installing Sock by Attribute on ZC 1.3.7.

This mod's Readme says that it was prepared for 1.3.6, and most of the files it replaces have been updated in 1.3.7.

I'd like to have this feature in the store I'm setting up, but should I wait for its author to update the mod before installing it?

Thanks!

30 Jan 2007, 8:03 AM
#135
richcon avatar

richcon

New Zenner

Join Date:
Jan 2007
Posts:
17
Plugin Contributions:
0

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

Ok, I'm tripping. The mod is version 4.4 for 1.3.7, and the Readme file was the one from 4.3 (ZC 1.3.6), hence it was the Readme that was out of date, not the mod. The author of this mod probably should update that.

30 Jan 2007, 9:49 AM
#136
hostilerecords avatar

hostilerecords

New Zenner

Join Date:
Dec 2006
Location:
Great Yarmouth, UK
Posts:
14
Plugin Contributions:
0

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

Please can someone help me out with this, I'm going crazy reading through all the threads/posts trying to find the answer :cry:
I guess something isn't set up right, it is supposed work right?

If it isn't - can someone put me out of my misery and tell me, please.

Below is my original post.

hostilerecords:

Hello, I have a problem with this addon.

I am using V4.31 of the addon and version 3.16 of Zencart.

I have installed it and then set up stock values for each attribute, however you can still checkout with variations which are out of stock, for example;

Army Camo Jacket
10 Total
5 Medium
5 Large

I can't checkout with more than 10, thats fine.
But I can checkout with 6 Medium.

How can I Fix this?

Stock config:
Check stock level- True
Subtract stock- True
Allow Checkout- False
Show stock when low- True

http://www.hostile-records.co.uk
Punk-Metal-Ska
Music-Clothing-Accessories

31 Jan 2007, 3:09 PM
#137
crabacle avatar

crabacle

New Zenner

Join Date:
Apr 2005
Posts:
26
Plugin Contributions:
0

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

Dear all - please see below:

OK - for the terminally stupid (which I must be) - what have I done wrong on the install? - Did anybody find any differences in the instructions and the reality for example? -

Where does the quantity box appear for the stock options? - Is it the normal attributes tab? - perhaps a screen print would be useful?

Thanks

crabacle:

OK - thanks to all concerned for this mod. However, I must be thick because I cannot get it to work.

I've been a good boy and done a WinMerge with all of the affected files and copied over the changes. Also copied up all new files. Loaded SQL and . . . . . ho hum!

What is happening is the items with attributes are showing out of stock when selecting. Also the Attrributes page for the item (in site admin) has no fields for entering different stock numbers for the items.

I am sure that tis should not be so . . . .

I am also slightly convinced that its something about the template files as well (or not!!)

Can anybody help with this please? - This mod is key to my site!

(PS - rolled all of the changes back to at least have a working site).

Thanks - but PLEASE HELP!

7 Feb 2007, 9:46 PM
#138
audradh avatar

audradh

Zen Follower

Join Date:
Oct 2005
Location:
Eastern US
Posts:
429
Plugin Contributions:
0

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

crabacle,
In the admin panel, pull down Catalog. You will find a new option entitled Products With Attributes Stock. This is where you set the quantities.

If I misunderstood your question, I apologize.

HTH,
Audra

8 Feb 2007, 2:36 PM
#139
redcinamn avatar

redcinamn

Zen Follower

Join Date:
Oct 2006
Posts:
175
Plugin Contributions:
0

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

HI.. I am running version 1.3.7 and have installed the latest of stock by attributes(4.4). When I go through admin->catalog->product with attributes stock

I 've added a product that has attributes both for size and color. When I go to the product with attributes stock manager the only option that shows in the color, I don't get the size option.

for example:

1 Size 5 shirt in red quantity in stock = 3
1 Size 8 shirt in blue quantity in stock =4
and so forth.

Did I perhaps download the wrong mod?

Thanks in advance!
~Renee:lamo:

Red

8 Feb 2007, 2:46 PM
#140
redcinamn avatar

redcinamn

Zen Follower

Join Date:
Oct 2006
Posts:
175
Plugin Contributions:
0

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

I have figured out my problem!!!!!!! NOT ENOUGH COFFEE. I am so sorry and now that I have actually added the sizes to my product in the attribute panel everything works properly. :wink2:

Wonderful add on buy the way!!

As always Thank you!!
~Renee

Red