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

Stocks by attributes

Locked

Views: 251,335

Results 261 to 280 of 1,126
This thread is locked. New replies are disabled.
19 Sep 2007, 7:12 PM
#261
kuroi avatar

kuroi

Totally Zenned

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

Stocks by attributes

woodlandsprite:

Does anyone here know how to edit/update a sql table (I already have this mod installed and I wish to update it to the most recent version).

The sql file with the download executes a "create" order but I don't need to create the table - it already exists.Just delete the CREATE statement down to and including the semi-colon and then run the SQL as you would normally i.e. via Admin > Tools > Install SQL Patches or phpMyAdmin or whatever other database management tool you might use, or your webhost supplies.

19 Sep 2007, 7:17 PM
#262
woodlandsprite avatar

woodlandsprite

Zen Follower

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

Re: Stocks by attributes

Thanks Kuroi. You're my Hero :D

Just to make certain. I'm going from this:
CREATE TABLE products_with_attributes_stock (
stock_id INT NOT NULL AUTO_INCREMENT ,
products_id INT NOT NULL ,
stock_attributes VARCHAR( 255 ) NOT NULL ,
quantity INT NOT NULL ,
PRIMARY KEY ( stock_id )
)
;

INSERT INTO configuration (configuration_title, configuration_key, configuration_value,
configuration_description, configuration_group_id, sort_order,
last_modified, date_added, use_function, set_function)
VALUES ('Show Attributes Stock', 'PRODUCT_STOCK_ATTRIBUTE_SHOW', 'true',
'Show the stock of items that have stock set by attributes?', '1', '500', NULL,
now(), NULL, "zen_cfg_select_option(array('true', 'false'),");

UPDATE configuration SET configuration_value = "false" WHERE configuration_key = "STOCK_ALLOW_CHECKOUT";

to starting with the bit that states "INSERT INTO..."

yes?

19 Sep 2007, 7:20 PM
#263
kuroi avatar

kuroi

Totally Zenned

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

Re: Stocks by attributes

Yes. The queries are stand-alone so you can just execute the ones you didn't have in your original version of stockattribute by danielcor.

19 Sep 2007, 7:30 PM
#264
woodlandsprite avatar

woodlandsprite

Zen Follower

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

Re: Stocks by attributes

FYI, for others who are looking at doing this "upgrade" the initial file comparisons I'm doing indicate that this may not be for the faint of heart who have no idea about code (like me ;) ) It's definitely not just a simple lunchtime exercise as I had hoped :P

19 Sep 2007, 7:40 PM
#265
woodlandsprite avatar

woodlandsprite

Zen Follower

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

Re: Stocks by attributes

For those that are contemplating this upgrade,

woodlandsprite:

It's definitely not just a simple lunchtime exercise as I had hoped

To elaborate, it appears the file structure is a little bit different between the original danielcor version and this upgrade. There are files that are in the original that no longer exist in the upgraded version, and new files (and file structure in some cases) in the upgrade.

Without understanding code, the way I would approach it is to strip out all the original DanielCor file modifications and then apply the updated files. YMMV - especially if you can actually read and understand code.

Also, as Kuroi noted, (either in this thread or another) this updated code may not include some of the security patches that were recommended. Be sure to have those on hand for comparison also when making these changes.

20 Sep 2007, 10:42 PM
#266
big_woody avatar

big_woody

New Zenner

Join Date:
Sep 2007
Posts:
35
Plugin Contributions:
0

Re: Stocks by attributes

Hope this is the right place to be asking this as i have Stocks by attributes installed because i need it for selling shoes ie ..
UK5 stock 1pair
Uk6 Stock 1 pair
Uk7 Stock 2pair
and so on ..

But now here's the thing...

I have a product i sell its a skateboard deck, now this items comes with a product called griptape, we do a FREE Grip but also want to offer 1/2 price up grade to 2 others one at £2.50 and one at £3.00 also an option to have it applied or loose.
so that five attributes ...
Free
Applied
Loose
Upgrade 1
Upgrade 2

with Stocks by attributes i have to set a stock level for each attribute so that's x5 but i only have 1 of the product in stock.

i hope that makes some sort of sense to someone and you can point me to the right way or add on i need.

28 Sep 2007, 6:39 PM
#267
kuroi avatar

kuroi

Totally Zenned

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

Re: Stocks by attributes

double e:

I am setting up my website, https://www.doubleEgifts.com, and I installed the stock by attributes v4.5 but it is not working properly. I have the newest version of Zen cart and I am very new to the whole .php thing and website design. I used this for most of the leather things I have listed with attributes but when I enter a quantity and hit submit button it puts attribute stock line in twice, so I have to delete one of the entries. I don't know what the problem is but I do know it takes long enough to enter amounts for all the attributes and variations now, without deleting an entry everytime also.
I can only assume that this would be very complicated to write but is it possible for this to work by having the attributes listed with a quantity boxes after each attribute on the submit page so you could enter all of the stock levels for each attribute and submit them all at once instead of navigating back and forth for each attribute? Just wondering if this is feasable or not.
I would appreciate any help and thanks in advance.
KeithI think you have two questions here:1. why does my stock get entered twice, and how do I stop it?

  1. is there a way of entering stock for multiple attribute combinations at the same time?
    The double entry behaviour is not correct and indeed I've not heard of this before, so I don't have a quick answer. Can you post some more about it? Does it happen with every attribute combination for every product with attributes or just some of them? Can you provide an example? Where do you see the double entry? Do you see the double entry if you look directly in the database e.g. by using phpMyAdmin?

The answer to the second question is no. The mod is designed to cope with a wide range of scenarios, so although it would be easy for somebody to create a variant that allowed multiple entry for products with just one attribute, and not to difficult for products with two, a product that had say five attributes would require a 5-dimensional table which would be extremely hard to render on a 2-dimensional screen. Maybe we'll see more creative input methods emerging when this functionality is taken into Zen Cart's code code in release 1.4.

29 Sep 2007, 8:36 AM
#268
kuroi avatar

kuroi

Totally Zenned

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

Re: Stocks by attributes

This is interesting, but also a little confusing.

To clarify when you go into the products with attributes entry form you see one set of attributes, but when you submit values it creates two database entries which are then displayed (presumably in the overall listing).

Now you are adding that Internet Explorer (you don't say which version) only displays one of those two entries for the same variant.

Clearly this is not normal behaviour for the mod or many other people would have been concerned about it, and I can't reproduce it in my test environments. My recommended lines of investigation would be 1) to check that none of your files have been corrupted by downloading the ones on your server and comparing them to a fresh download of the mod and 2) to ensure that there is not a problem with how your attributes have been set up.

1 Oct 2007, 8:59 PM
#269
sobebabies avatar

sobebabies

Zen Follower

Join Date:
Sep 2006
Posts:
158
Plugin Contributions:
0

Re: Stocks by attributes

I've got one product I drop ship that have 4 attributes with quite a few options on some of them - it adds up to 420 permutations. :laugh: I'd do this in SQL if I have to - is there any quicker way to make all combos for a given product have a very high number in stock? I am doing most combos by hand for the rest of my inventory, as boring as that is, but, well, this one product is going to take weeks to do manually. :shocking:

2 Oct 2007, 7:59 AM
#270
kuroi avatar

kuroi

Totally Zenned

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

Re: Stocks by attributes

sobebabies:

I've got one product I drop ship that have 4 attributes with quite a few options on some of them - it adds up to 420 permutations. :laugh: I'd do this in SQL if I have to - is there any quicker way to make all combos for a given product have a very high number in stock? I am doing most combos by hand for the rest of my inventory, as boring as that is, but, well, this one product is going to take weeks to do manually. :shocking:It you only drop ship for this product and therefore want all possible combinations to be available, just put a high stock value on the product itself and don't create any attribute stock.

If some of the combinations are are not possible, then you would need to set attribute stock to zero to disable the combinations that visitors are not able to purchase. There is no built in way to achieve this, and because of the way in the which the data is structured, a purely SQL solution would be very complex. This really feels like it needs an upload file, possibly imported via your database management tool (or phpMyAdmin).

2 Oct 2007, 5:00 PM
#271
sobebabies avatar

sobebabies

Zen Follower

Join Date:
Sep 2006
Posts:
158
Plugin Contributions:
0

Re: Stocks by attributes

kuroi:

It you only drop ship for this product and therefore want all possible combinations to be available, just put a high stock value on the product itself and don't create any attribute stock.

Oh! I didn't realize that! No, this isn't the only product I drop ship but this is such an easier solution. Thanks! :)

I installed this module a few weeks ago and was gonna get to updating the numbers. Someone called me saying something was out of stock - I hadn't even realized that people noticed the *** and bright pink (for me, anyway) warning because order were coming in anyway and stuff going negative. So anyway, I've been scrambling to get the inventory in correctly - sales were suspiciously low.:oops::lookaroun

3 Oct 2007, 1:43 AM
#272
milobloom avatar

milobloom

Totally Zenned

Join Date:
Feb 2004
Posts:
1,267
Plugin Contributions:
1

Re: Stocks by attributes

Is there a way to put qunatity counts next to the sizes?
Or at least a "out of stock" if it is in fact?

Thanks

3 Oct 2007, 6:57 AM
#273
kuroi avatar

kuroi

Totally Zenned

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

Re: Stocks by attributes

milobloom:

Is there a way to put qunatity counts next to the sizes?
Or at least a "out of stock" if it is in fact?This is answered in the mod's documentation over at the Wiki. Look for the FAQ section, it's question number 1. There's also further discussion of it earlier in this thread and in the official support thread for this mod.

4 Oct 2007, 12:51 AM
#274
milobloom avatar

milobloom

Totally Zenned

Join Date:
Feb 2004
Posts:
1,267
Plugin Contributions:
1

Re: Stocks by attributes

odd.

It says to edit

includes/modules/pages/product_info/main_template_vars_attributes.php

But I do not have that file.
Although I do have this mod working....

Is this right???

4 Oct 2007, 4:49 AM
#275
woodlandsprite avatar

woodlandsprite

Zen Follower

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

Re: Stocks by attributes

milobloom:

odd.

It says to edit

includes/modules/pages/product_info/main_template_vars_attributes.php

But I do not have that file.
Although I do have this mod working....

Is this right???

Milo you need to read more carefully ;)
the Wiki sas to edit includes/modules/attributes.php INSTEAD of the file that is called out above :)

4 Oct 2007, 11:08 AM
#276
milobloom avatar

milobloom

Totally Zenned

Join Date:
Feb 2004
Posts:
1,267
Plugin Contributions:
1

Re: Stocks by attributes

Ok. My bad.

Here is another problem I am having.
When I install this mod, The results show a drop down box that drops down as if there are attributes in there however there are none. Furthermore it is a very thin box as if it is not reading the attribute names. The drop down box however goes down as far as the number of attribute variables I have.

I have had a simular problem that is probably related. It is when I tried to use the advanced attribute controller. The attributes controller worked fine but when I tried that mod I got the same results inside that I described above.

5 Oct 2007, 3:26 AM
#277
milobloom avatar

milobloom

Totally Zenned

Join Date:
Feb 2004
Posts:
1,267
Plugin Contributions:
1

Re: Stocks by attributes

When I posted this question for the problem with Advanced Atributes
Someone asked me if I had Java Script enabled in my browser.
I checked and it was.
But this has me thinking. Is there possably something I overrid that stoped me from allowing java scripts to be used on my site? Causing the problem I mentioned?

5 Oct 2007, 5:39 AM
#278
kuroi avatar

kuroi

Totally Zenned

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

Re: Stocks by attributes

Milo

Javascript runs in the visitors window rather than on your site. The only way that you can inhibit it, is to make it unavailable to the visitor's browser. This is often unfortunately easy to do, especially on the catalog side, by simply putting it, or leaving it, in the wrong place.

Whether this is the issue for you is difficult to say. At this point you haven't told us which of the three stock by attribute mods you're using, or where in your site the problem occurs. So we have very little to go on.

5 Oct 2007, 11:54 AM
#279
milobloom avatar

milobloom

Totally Zenned

Join Date:
Feb 2004
Posts:
1,267
Plugin Contributions:
1

Re: Stocks by attributes

I am not sure which of the three I am using.
Actually I can probably break it down to 2.
(I use Catlog->Product with Attribute Stock) to add my product attributes.
I do not have the one that you have to put into the quanity into the actual attribute itself. (Dealing with sizes wouldnt make sence for that)

I tried to edit admin->products_with_attribute_stock.php to see if there
was any version info in there but I did not see any.

I also looked at my backup directories where I save all the mods i use.
I have stockattribute_by_danielcor_3.01 & stock_by_attributes_4.4 downloaded.
I could not be 100% but I think I am using 4.4

12 Oct 2007, 3:20 PM
#280
kuroi avatar

kuroi

Totally Zenned

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

Re: Stocks by attributes

Milo

I think you'll find the answer to your problem by following this thread.