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

Stocks by attributes

Locked

Views: 251,330

Results 341 to 360 of 1,126
This thread is locked. New replies are disabled.
10 Dec 2007, 3:49 PM
#341
high2k avatar

high2k

Zen Follower

Join Date:
May 2006
Location:
Scotland
Posts:
198
Plugin Contributions:
0

Stocks by attributes

I just tried to setup this module on my store and came across a couple of problems:

  1. I was able to order items even though there were not enough in stock. On clicking 'checkout' there was no message to say that the item was out of stock but I was not able to proceed beyond checkout.
  2. On trying to order any item in my store I was faced with the following error message:-

Fatal error: Cannot redeclare class order in /home/961/keela07/www.keela.co.uk/public_html/includes/classes/order.php on line 20

Any idea what might have gone wrong? It all looked fine from Admin. I have now stripped the contibution files off my site and it's working fine again.
PS. I had Configure > Stock set to the correct settings

10 Dec 2007, 5:14 PM
#342
kuroi avatar

kuroi

Totally Zenned

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

Re: Stocks by attributes

atomage:

Sorry for all the posts... I thought I would re-install the the stock by attributes mod again just to see if that would clear things up, but when I tried to install the stock_attribute.sql it gave me this error:

--
1062 Duplicate entry 'STOCK_SHOW_LOW_IN_CART' for key 2
in:
[INSERT INTO zen_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('Show available stock level in cart when less than order', 'STOCK_SHOW_LOW_IN_CART', 'false', 'When customer places more items in cart than are available, show the available amount on the shopping cart page:', '9', '6', NULL, now(), NULL, "zen_cfg_select_option(array('true', 'false')," );]
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.

Would this have anything to do with my problem? I'm not sure why this is coming up.This just means that you didn't clean out the configuration settings from the first install before you tried to re-install. It's not a problem. You can just ignore it as it confirms that they're already there.

10 Dec 2007, 5:17 PM
#343
atomage avatar

atomage

New Zenner

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

Re: Stocks by attributes

Okay, so if that is fine that means my problem is still something else then. any other ideas?

10 Dec 2007, 5:18 PM
#344
kuroi avatar

kuroi

Totally Zenned

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

Re: Stocks by attributes

high2K:

I just tried to setup this module on my store and came across a couple of problems:

  1. I was able to order items even though there were not enough in stock. On clicking 'checkout' there was no message to say that the item was out of stock but I was not able to proceed beyond checkout.
  2. On trying to order any item in my store I was faced with the following error message:-

Fatal error: Cannot redeclare class order in /home/961/keela07/www.keela.co.uk/public_html/includes/classes/order.php on line 20

Any idea what might have gone wrong? It all looked fine from Admin. I have now stripped the contibution files off my site and it's working fine again.
PS. I had Configure > Stock set to the correct settingsThe most common cause of this problem is leaving a backup files littered across the site resulting in the wrong getting executed in some places, and errors about trying to do the same thing twice where that's not allowed.

11 Dec 2007, 11:05 PM
#345
trishac avatar

trishac

New Zenner

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

Re: Stocks by attributes

I am attempting to add the quantity of each attribute next to the product. I am using the following thread for instructons: http://www.zen-cart.com/forum/showthread.php?t=25987&page=28 (It's post number #272.) I'm updating the attributes.php file, and it all displays properly; however, the attribute information is not carried over to the shopping cart. Once I add an item to the shopping cart, it displays 1 shirt, but it doesn't indicate the size. Therefore, the order doesn't indicate the attribute either. When I undo the changes I made to the attributes.php page, the attributes are carried over to the shopping cart, but the quantity is not displayed on the product page. Any ideas what I need to check? I feel like I've gone over the instructions countless times, but I'm just not seeing what needs to be changed. ANY suggestions would be so very appreciated.

12 Dec 2007, 5:37 PM
#346
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.

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

This didn't do the trick. It still says the product is backordered no matter what combination I use. :(

12 Dec 2007, 5:46 PM
#347
sobebabies avatar

sobebabies

Zen Follower

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

Re: Stocks by attributes

I'd love to get a quickie guide on how to tweak the database to get this done. Which tables, how do I find what I need? The SQL syntax for the INSERT or UPDATE would be helpful. I just want to be able to set this type of product to have all attributes to super high and never have to touch it again manually.

12 Dec 2007, 7:11 PM
#348
kuroi avatar

kuroi

Totally Zenned

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

Re: Stocks by attributes

sobebabies:

This didn't do the trick. It still says the product is backordered no matter what combination I use. :(What version of Stock by Attribute are you using, and what version of Zen Cart?

12 Dec 2007, 7:14 PM
#349
sobebabies avatar

sobebabies

Zen Follower

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

Re: Stocks by attributes

kuroi:

What version of Stock by Attribute are you using, and what version of Zen Cart?

Why, is this fixed? I have v4.4 and 1.3.7. Upgrade scheduled but tough time of year!

12 Dec 2007, 7:27 PM
#350
kuroi avatar

kuroi

Totally Zenned

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

Re: Stocks by attributes

4.4 is an all or nothing version which requires attribute stock to be set up for all attribute combinations, or they're treated as zero and orders then go to backorder.

Download version 4.6 (not 4.7) and take replace only your includes/functions/functions_lookups.php with the one from the newer version.

This is the change that allows the product level quantity to be used when no attribute level stock has been set. The change was made for a client in a very similar position to you and is working perfectly for him.

12 Dec 2007, 7:31 PM
#351
sobebabies avatar

sobebabies

Zen Follower

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

Re: Stocks by attributes

Thank you so much! :hug:

18 Dec 2007, 4:44 PM
#352
osdude avatar

osdude

New Zenner

Join Date:
Nov 2007
Location:
south carolina
Posts:
42
Plugin Contributions:
0

Re: Stocks by attributes

Is there a way to add 'X' stock to each product?

I already have the car populated with products and attributes. What I want, is to add 'X' stock to all products with an attribute.

I was thinking SQL?

ANyone have an idea?

27 Dec 2007, 11:46 PM
#353
dab avatar

dab

New Zenner

Join Date:
Jan 2007
Location:
UK
Posts:
62
Plugin Contributions:
0

Re: Stocks by attributes

I have ZenCart 1.3.7 and have just upgraded Stock By Attributes from 4.4 to 4.6, which seems to be fine.

One thing is confusing me though:
I have a product that has 3 attributes A, B and C, and I have put a quantity of 1 at product level and deleted all the product variants at attribute level. This now allows one product to be ordered for of each of the attributes - 3 in total.

Is this the expected behaviour, or should it only allow a total of one product to be ordered regardless which attribute is selected.

Any help would be appreciated.

27 Dec 2007, 11:53 PM
#354
kuroi avatar

kuroi

Totally Zenned

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

Re: Stocks by attributes

osdude:

Is there a way to add 'X' stock to each product?

I already have the car populated with products and attributes. What I want, is to add 'X' stock to all products with an attribute.

I was thinking SQL?SQL is the answer. But the devil will be in the detail of the type and number of attributes on each product, which version of stock by attributes you're using and whether you intend to use attribute stock for all products with attributes or just some of them. Even in the simplest of the cases, the SQL's going to be very complex. The table structure just doesn't really work well with this approach.

28 Dec 2007, 12:01 AM
#355
kuroi avatar

kuroi

Totally Zenned

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

Re: Stocks by attributes

dab:

I have ZenCart 1.3.7 and have just upgraded Stock By Attributes from 4.4 to 4.6, which seems to be fine.

One thing is confusing me though:
I have a product that has 3 attributes A, B and C, and I have put a quantity of 1 at product level and deleted all the product variants at attribute level. This now allows one product to be ordered for of each of the attributes - 3 in total.

Is this the expected behaviour, or should it only allow a total of one product to be ordered regardless which attribute is selected.

Any help would be appreciated.
I'm afraid that's how it works. But that's nothing to do with stock by attribute (which you've effectively disabled for this product). It's core Zen Cart doing this. Each time a customer adds a product to their cart, it checks against the product stock level and not other products already in their cart, or already in the carts of other shoppers on the site at the same time.

28 Dec 2007, 12:22 AM
#356
dab avatar

dab

New Zenner

Join Date:
Jan 2007
Location:
UK
Posts:
62
Plugin Contributions:
0

Re: Stocks by attributes

Thank you for your quick reply kuroi.
This helps me understand what is happening, and confirms that things are working as they should be. It makes a lot more sense to me now.

I do have many other products which make more effective use of your mod, but it was just this one that was confusing me.

Thanks again for your help.

28 Dec 2007, 4:55 AM
#357
osdude avatar

osdude

New Zenner

Join Date:
Nov 2007
Location:
south carolina
Posts:
42
Plugin Contributions:
0

Re: Stocks by attributes

I've played around on a test site and so far, I've managed to mess it up every time. My SQL knowledge is less than good, so I think my time would be better spent adding the products manually.

Is there a way to make new products add 'X' stock by default when adding attributes? I hadn't thought of this, but I will dig into the code to see if anything jumps out at me...

Thank you for your reply

28 Dec 2007, 4:56 AM
#358
osdude avatar

osdude

New Zenner

Join Date:
Nov 2007
Location:
south carolina
Posts:
42
Plugin Contributions:
0

Re: Stocks by attributes

kuroi:

SQL is the answer. But the devil will be in the detail of the type and number of attributes on each product, which version of stock by attributes you're using and whether you intend to use attribute stock for all products with attributes or just some of them. Even in the simplest of the cases, the SQL's going to be very complex. The table structure just doesn't really work well with this approach.

I've played around on a test site and so far, I've managed to mess it up every time. My SQL knowledge is less than good, so I think my time would be better spent adding the products manually.

Is there a way to make new products add 'X' stock by default when adding attributes? I hadn't thought of this, but I will dig into the code to see if anything jumps out at me...

Thank you for your reply

30 Dec 2007, 4:57 AM
#359
cropinstop avatar

cropinstop

New Zenner

Join Date:
Oct 2006
Location:
Surprise Arizona
Posts:
73
Plugin Contributions:
0

Re: Stocks by attributes

New (?) problem with version 4.7 on ZC1.3.8.

Did a new install of Stock by attributes 4.7 in ZC 1.3.8. Setup up the following attribute stock:

8" Scrapbook
Blue - quantity = 1
Ivory - quantity = 3

Did a test buy, and was able to order without an out of stock warning:
Blue - qty = 4, and concurrently
Ivory, qty = 4

Received an out of stock warning for Blue if I ordered 5 or Ivory if I ordered 5.
I expected it to block attempts to order more than 1 Blue. or 3 Ivory. Is this a bug in the new release, or what is wrong?

30 Dec 2007, 8:28 AM
#360
crankyjim avatar

crankyjim

New Zenner

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

Re: Stocks by attributes

frustrating problem with ver 4.3 on 1.3.6.

The quantity discounts is not calculating correctly.

item x should be 18.00 for quantity > 6. If I order 3 of one attribute set and 3 of another, the second 3 items receives the discount correctly, but the first 3 stay at the non discount price (18.50).

Have I set something incorrectly?