Forums / All Other Contributions/Addons / 'stock by attributes' and products with 0 quantity

'stock by attributes' and products with 0 quantity

Started by ajes on 22 Feb 2011, 5:52 PM · Views: 3,645

Results 1 to 15 of 15
22 Feb 2011, 5:52 PM
#1
ajes avatar

ajes

New Zenner

Join Date:
Feb 2011
Posts:
3
Plugin Contributions:
0

'stock by attributes' and products with 0 quantity

Hi,
I'm using 'stock by attributes'.
I want, that zencart do not display attributes for item, that have quantity=0.
Example:
product: t-shirt
attributes: color and size
color: red, black
size: s, m

Now.
red S = 3
red M = 0
black S = 0
black M = 1

When client want buy this t-shirt, he/she don't know witch color and size are available. So I want that zencart will display (in my example)

red S
black M

but not 'red M' and 'black S'.

How to do it?
Regards

17 Mar 2011, 11:44 AM
#4
tre4 avatar

tre4

New Zenner

Join Date:
Mar 2011
Posts:
3
Plugin Contributions:
0

Re: 'stock by attributes' and products with 0 quantity

Hi all. I'm new here but been ploughing through thousands of threads to try and get to the answer.

This thread is the exact problem I need solving.

I am looking to update from my OSC shop but it seems pointless if The stock attributes do not show if items that are out of stock.

I really don't want to give up on my ZenCart but will have to if there is no way round this.

Has anybody managed to get this to work.

Any feedback is much appreciated.

18 Mar 2011, 4:03 PM
#5
athena avatar

athena

Totally Zenned

Join Date:
Jan 2006
Location:
NM
Posts:
740
Plugin Contributions:
0

Re: 'stock by attributes' and products with 0 quantity

You said:

but it seems pointless if The stock attributes do not show if items that are out of stock.

did you mean

but it seems pointless if The "module" show items that are out of stock.

?

I'm looking for a module that will let a customer know what colors/sizes are in stock before they select it, or a module that will not show the attribute if it is not in stock.

18 Mar 2011, 4:28 PM
#6
athena avatar

athena

Totally Zenned

Join Date:
Jan 2006
Location:
NM
Posts:
740
Plugin Contributions:
0

Re: 'stock by attributes' and products with 0 quantity

This seems good enough for now...built into Zencart:

Configuration > Stock > "Show available stock level in cart when less than order" set to "true"

18 Mar 2011, 4:51 PM
#7
athena avatar

athena

Totally Zenned

Join Date:
Jan 2006
Location:
NM
Posts:
740
Plugin Contributions:
0

Re: 'stock by attributes' and products with 0 quantity

I apologize....or should Zen!

that is version 1.3.8a

Why is this not available in the new version!?

Please enlighten me....now that i've found it we can't do without it...

18 Mar 2011, 5:38 PM
#8
athena avatar

athena

Totally Zenned

Join Date:
Jan 2006
Location:
NM
Posts:
740
Plugin Contributions:
0

Re: 'stock by attributes' and products with 0 quantity

OK...I was right...sort of .....sorry for doubting...zen always come through....

This feature gives the customer a count of what is in stock, if less than they want, when they click the add to cart button. It shows up in Configure > Stock after installing the Stock by Attributes mod at this link.

I just did an install in 1.3.9h and it seems to work just as fine as in our 1.3.8x shop.

22 Mar 2011, 8:38 AM
#9
ajes avatar

ajes

New Zenner

Join Date:
Feb 2011
Posts:
3
Plugin Contributions:
0

Re: 'stock by attributes' and products with 0 quantity

Yes, but I'd like to have something, to show client that this size/color (whatever) is unavailable, before client click 'add to cart'.

Regards

22 Mar 2011, 10:59 AM
#10
tre4 avatar

tre4

New Zenner

Join Date:
Mar 2011
Posts:
3
Plugin Contributions:
0

Re: 'stock by attributes' and products with 0 quantity

ajes:

show client that this size/color (whatever) is unavailable, before client click 'add to cart'.

Exactly That.

Somebody had already shown an exampe of this working here: http://www.vkoonyc.com/accessories-c-7/cashmere-loop-scarf-p-20

It would be interesting to know if this was done with the standard zen cart modules or if a large amount of programming was required to achieve this.

22 Mar 2011, 1:20 PM
#11
athena avatar

athena

Totally Zenned

Join Date:
Jan 2006
Location:
NM
Posts:
740
Plugin Contributions:
0

Re: 'stock by attributes' and products with 0 quantity

I can't see any indication that it is a zencart. None of the following indicate they do this, however, that link above to the store with the color attribute disappearing when the size attribute is chosen may be served by existing mods. Here are just some in a nut shell from the download section. I am also interested in finding something to do this before the customer adds to cart so anyone who can shed light on the project please advise.

**Product Attribute Grid**

The module is designed to set out attributes within a grid format, when 2 dropdown or radio options are available. For example, if an item has both colour and size. The grid is populated with quantity fields, so that a number of products can be added at any time.
GRID has now been defined as a new option type, rather than using radio and checkbox fields.

**Attribute Cross-Validation**
"here is a less technical example regarding options that cannot exist with other options: I sell a shirt. The customer can order this shirt with a number of required options (color, size, etc.). Ok, no problem there - ZenCart handles that out of the box. The shirt also has non-required options: It can be monogrammed with initials entered in a text box. If the customer wants monogramming, though, they have to tell us where to put the monogram (right sleeve, left sleeve
shirt tail), right? You see where this is going? If the customer enters INITIALS (in a text box) but doesn't tell us where to put the initials (i.e. "none" on the drop down), then the system will issue an error and say that INITIALS cannot exists with "none", and conversely "none" cannot exist with INITIALS. Incidentally, the messages are built dynamically based on the language files and the rule that was violated. Since we don't know the customer's intent (does he really want initials or not), "cannot exist" rules display messages for both options included in the setup table (in this case the Initials Text Box and the Initials Location Drop Down error out). The error messages look like this:_ On the Option for: Optional Initials "AAA" Cannot Co-exist With Optional Initials Location "none" _
_ On the Option for: Optional Initials Location "none" Cannot Co-exist With Optional Initials "AAA" _
On a similar note here is and example regarding options that require (need) other options:
The customer tells us where to put the initials (eg shirt tail), but doesn't enter text in the text box. In this case we
have set up a rule that says the shirt tail option "needs" text in the initials text box option. When the customer tries to
add the item to the cart, it errors out and says just that -
_ On the Option for: Optional Initials Location "Shirt Tail" Needs Optional Initials "TEXT" _

this looks like a better mod for what it does:

**Improved Attributes Controller**
This module changes the way the dropdown select fields work on the Attributes Controller Page. The content of the second dropdown (option values) is now dependant upon the content of the first dropdown (option names), so you will only see values that apply to the selected option name. Javascript is used to avoid having the page reload when you make that selection in the first box. Here's the major time saver: the second box (option values) allows multiple selections! So you can add a whole bunch of option values with a single page load!

22 Mar 2011, 1:32 PM
#12
athena avatar

athena

Totally Zenned

Join Date:
Jan 2006
Location:
NM
Posts:
740
Plugin Contributions:
0

Re: 'stock by attributes' and products with 0 quantity

sorry....that last mod is already built into the newest zencart 1.3.9

22 Mar 2011, 7:27 PM
#13
tej20 avatar

tej20

New Zenner

Join Date:
Mar 2011
Posts:
7
Plugin Contributions:
0

Re: 'stock by attributes' and products with 0 quantity

help guys, i'm trying to install 'stock by attributs but i get this error when i install the .sql

1062 Duplicate entry 'STOCK_SHOW_LOW_IN_CART' for key 'unq_config_key_zen'
in:
[INSERT INTO znc_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')," ), ('Display Images in Admin', 'STOCK_SHOW_IMAGE', 'false', 'Display image thumbnails on Products With Attributes Stock page? (warning, setting this to true can severly slow the loading of this 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.

i've installed ok the first time but it didn't work (didn't show notting and i've decided to reinstall it. ps: yes i've deleted the first table in the phpmyadmin).

any ideas who can i install it corect and the code to function corectly?

1 Apr 2011, 7:18 PM
#14
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: 'stock by attributes' and products with 0 quantity

That just means that the records were already in your znc_configuration table (a standard table that you didn't change when you deleted the other (new) table). As long as the information already in that table is correct, there is nothing to worry about.

2 Apr 2011, 4:24 AM
#15
lankeeyankee avatar

lankeeyankee

Totally Zenned

Join Date:
Jan 2007
Posts:
1,514
Plugin Contributions:
1

Re: 'stock by attributes' and products with 0 quantity

athena:

I can't see any indication that it is a zencart.
Definitely zen cart, look at the source code and you will see the zen cart name in the head.


Zen Cart and it's community are the best!!