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,362

Results 1,321 to 1,340 of 3,609
13 Oct 2011, 13:26
#1321
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

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

webstar59:

Just now found the error in the file products_with_attributes_stock.php on line 482.

echo '<div id="pwa-table"';

IS MISSING >

It should read echo '<div id="pwa-table">';

Finally a fix for that! It was such a tiny thing that we all missed it!

So now I have a new problem. I haven't followed all of this thread so can't be sure this hasn't been discussed but it is a very strange item indeed.

The cart has 2 products that has a choice of fabrics and colors. So there are three separate attributes with images. Each has a different option name but using a dropdown with these means that each places something into the cart. One choice, three attributes - 2 of which say please choose.

I switched to radio buttons with no default. Only one choice shows in the shopping cart.

Fast forward to Stock by Attributes. When you go to insert the attribute with stock, all three choices show up. If you change one to the color and the other 2 to please choose, the shopping cart then requires that to show in the cart - in other words - just like with the dropdowns.

The client hates that and I can't blame her - it's actually confusing to the buyer.

So the question is, has anyone run into this scenario before?

It's a first for me and I work with zen cart full time.

15 Oct 2011, 13:16
#1322
b005t3drsx avatar

b005t3drsx

New Zenner

Join Date:
Oct 2011
Posts:
5
Plugin Contributions:
0

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

Okay yes I have read through all I can find but I can't find anything that will help with my situation. Currently I own a t-shirt company. All my products have attributes from the option name size. There are 5 sizes. The problem I have is that people are able to order sizes that are out of stock. It does give a warning during the checkout. I want the system to not show the size in the drop down if the quantity is less than 1. Does anyone know how I can accomplish this?

You can see my link to my test item. Currently small has 4 and all other sizes have 0 but still allows you to order the item. Please help.

http://www.wickedfitapparel.com/index.php?main_page=product_info&cPath=1&products_id=90&zenid=83r0vf6m4i64u2fmiq82ls7ee0

15 Oct 2011, 15:17
#1323
pablo avatar

pablo

New Zenner

Join Date:
Jun 2011
Posts:
91
Plugin Contributions:
0

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

Copy the code update on post 1133 of this thread - page 114 by athena. Replace all the code in your header_php.php file for this module. After code update, attributes with a zero stock level will not show so they cannot be selected.

16 Oct 2011, 01:36
#1324
b005t3drsx avatar

b005t3drsx

New Zenner

Join Date:
Oct 2011
Posts:
5
Plugin Contributions:
0

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

I did that and it still doesnt work. Does anyone know what php the drop down is controlled by. I want to write my own code that will check the products_with_attributes table and if the quantity is 0 then have it now show in the drop down.

16 Oct 2011, 16:36
#1325
bob_la_londe avatar

bob_la_londe

New Zenner

Join Date:
Sep 2008
Posts:
15
Plugin Contributions:
0

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

Using the latest version of Zen Cart 1.3.9h.

I am getting ready to implement this mod, and I have scanned through the installation, but the first step kinda stumps me.

It kinda sounds like I need to mod/create/change the database before uploading the MOD to my cart. How do I do that? If there is a post that spells that out just point me there and I'll read it. I'm not asking anybody to spell out what's already been posted.

I would like to point out that "read this thread" is a little onerous. At 133 pages its a bit hard to find anything. I've read quite a bit of it, but...

Create a new database table and a new configuration switch by running the 'stock_attribute.sql' via Admin->Tools->Install SQL Patches. If you prefer to use another method to create this table, you will need to edit the file if you use a prefix such as "zen_" for your tables.

Its the first step listed, but sounds like something you have to do after you upload it.

16 Oct 2011, 16:50
#1326
pablo avatar

pablo

New Zenner

Join Date:
Jun 2011
Posts:
91
Plugin Contributions:
0

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

The mod contains two sql patch files - stock_attribute.sql and update_1_4_10.sql. These files set up tables in your database so the mod has a place to put the data.

BACKUP YOUR DATABASE - BACKUP YOUR DATABASE - BACKUP YOUR DATABASE.

Copy the contents of the stock_attribute.sql file and log into your admin section.
Go to TOOLS and look for INSTALL SQL PATCHES
Open and paste the code into it and press SEND
Same for the other file

16 Oct 2011, 16:57
#1327
bob_la_londe avatar

bob_la_londe

New Zenner

Join Date:
Sep 2008
Posts:
15
Plugin Contributions:
0

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

Bob La Londe:

Using the latest version of Zen Cart 1.3.9h.

I am getting ready to implement this mod, and I have scanned through the installation, but the first step kinda stumps me.

It kinda sounds like I need to mod/create/change the database before uploading the MOD to my cart. How do I do that? If there is a post that spells that out just point me there and I'll read it. I'm not asking anybody to spell out what's already been posted.

I would like to point out that "read this thread" is a little onerous. At 133 pages its a bit hard to find anything. I've read quite a bit of it, but...

Its the first step listed, but sounds like something you have to do after you upload it.

Ok, I uploaded it using File Zilla and then tried it. I got this.

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 'stock_attribute.sql' at line 1
in:
[stock_attribute.sql;]
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.

16 Oct 2011, 16:58
#1328
bob_la_londe avatar

bob_la_londe

New Zenner

Join Date:
Sep 2008
Posts:
15
Plugin Contributions:
0

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

Pablo:

The mod contains two sql patch files - stock_attribute.sql and update_1_4_10.sql. These files set up tables in your database so the mod has a place to put the data.

BACKUP YOUR DATABASE - BACKUP YOUR DATABASE - BACKUP YOUR DATABASE.

Copy the contents of the stock_attribute.sql file and log into your admin section.
Go to TOOLS and look for INSTALL SQL PATCHES
Open and paste the code into it and press SEND
Same for the other file

Thanks. Not at all what I expected.

16 Oct 2011, 17:01
#1329
bob_la_londe avatar

bob_la_londe

New Zenner

Join Date:
Sep 2008
Posts:
15
Plugin Contributions:
0

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

Bob La Londe:

Thanks. Not at all what I expected.

Ok, the stock attribute worked fine cut and paste, but the update gave me this error.

1062 Duplicate entry 'STOCK_SHOW_IMAGE' 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 ('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.

16 Oct 2011, 17:13
#1330
pablo avatar

pablo

New Zenner

Join Date:
Jun 2011
Posts:
91
Plugin Contributions:
0

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

That means you already had that entry in your database and MySql won't let you have duplicate entries exactly the same.
Since it was already there, you can just ignore the warning.

16 Oct 2011, 17:26
#1331
bob_la_londe avatar

bob_la_londe

New Zenner

Join Date:
Sep 2008
Posts:
15
Plugin Contributions:
0

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

Catalog->Products with Attributes Stock

I do not see this option.

16 Oct 2011, 19:51
#1332
pablo avatar

pablo

New Zenner

Join Date:
Jun 2011
Posts:
91
Plugin Contributions:
0

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

You do not have the module installed in the correct folders. Be sure to rename the admin folder to your new admin folder name and the YOUR_TEMPLATE folder named to the template you are using.

16 Oct 2011, 21:32
#1333
bob_la_londe avatar

bob_la_londe

New Zenner

Join Date:
Sep 2008
Posts:
15
Plugin Contributions:
0

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

Pablo:

You do not have the module installed in the correct folders. Be sure to rename the admin folder to your new admin folder name and the YOUR_TEMPLATE folder named to the template you are using.

Before uploading so that it overwrites files right?

17 Oct 2011, 00:23
#1334
pablo avatar

pablo

New Zenner

Join Date:
Jun 2011
Posts:
91
Plugin Contributions:
0

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

If you are using Filezilla, the best way to do it is to select the files in the individual folders and drag them to the proper folder on your server. That was the way I installed mine and it worked great. A little slower, but you get all the files in the right place.

17 Oct 2011, 17:32
#1335
pablo avatar

pablo

New Zenner

Join Date:
Jun 2011
Posts:
91
Plugin Contributions:
0

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

I have products with attributes that I use radio buttons for. Is there a way to line up the buttons horizontally instead of vertically??

19 Oct 2011, 04:50
#1336
wildchick avatar

wildchick

New Zenner

Join Date:
Jun 2011
Posts:
86
Plugin Contributions:
0

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

I am having the problem when that when an out of stock item is added, no warning message comes in the header saying an item is out of stock and on *** message comes by the item(suggesting which item it is). Also at checkout, there is not a value of how many units of stock are available (even with this setting turned on in admin).

I have added version: stock_by_attributes_1-4-13

The fact of the problem is that when I make the setting DO NOT ALLOW CHECKOUT WHEN ITEM OUT OF STOCK the customer has no way of knowing which item it is.

So I have made it so the customer CAN check out with an out of stock item in cart. OF course they dont know it will be back ordered b/c they dont get the header message nor the *** message by item. And whats worse is I sometimes cant get the item in stock.

Im not sure why, but this could just be b/c of my custom cart, however I read the forums and it seems other have had this problem as well.

Is there a known solution? I would love to have at least the Header notification come up.

19 Oct 2011, 14:39
#1337
pablo avatar

pablo

New Zenner

Join Date:
Jun 2011
Posts:
91
Plugin Contributions:
0

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

Copy the code update on post 1133 of this thread - page 114 by athena. Replace all the code in your header_php.php file for this module.

21 Oct 2011, 08:38
#1338
wildchick avatar

wildchick

New Zenner

Join Date:
Jun 2011
Posts:
86
Plugin Contributions:
0

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

Thank you sir! that solution worked perfectly! No more letting people over order ;)

23 Oct 2011, 14:45
#1339
rayeln avatar

rayeln

New Zenner

Join Date:
Oct 2011
Posts:
1
Plugin Contributions:
0

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

Have found a little problem on my store (1.39h with SBA) about "restock product quantity", as Athena showed, it seems ok if "bought" ONE item with attribute, then deleted the order, the item back correctly with attribute.

However, if bought SEVERAL items with different attributes. After deleted the order, the items did not back with attribute. Only the "Total Quantity" comes back in original number.

Example:

Item A

Quantity 3
boot size 8 - 2
boot size 6 - 1

Item B

Quantity 5
shirt size M - 2
shirt size L - 3

"bought" a size 8 Item A, two size L Item B. Now:

Item A

Quantity 2
boot size 8 - 1
boot size 6 - 1

Item B

Quantity 3
shirt size M - 2
shirt size L - 1

I deleted the order and checked "Restock product quantity" and it come back like this:

Item A

Quantity 3
boot size 8 - 1
boot size 6 - 1

Item B

Quantity 5
shirt size M - 2
shirt size L - 1

Thanks in advance for kind help!

athena:

I ran a few test and all seems ok and we haven't noticed any problems so far.

Quantity 4
boot size 8 - 2
boot size 6 - 1
boot size 4 - 1

I "bought" a size 8

Quantity 3
boot size 8 -1
boot size 6 - 1
boot size 4 - 1

I deleted the order and checked "Restock product quantity" and it put it back correctly:

Quantity 4
boot size 8 - 2
boot size 6 - 1
boot size 4 - 1

26 Oct 2011, 20:44
#1340
ssteel avatar

ssteel

New Zenner

Join Date:
Aug 2011
Posts:
8
Plugin Contributions:
0

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

OK...
I have Zen Cart 1.3.9 with the stock by attributes and dynamic drop downs. I also overwrote the header_php.php file in the shopping cart as per Athena back in post 1133.

I am still getting out of stock items showing up in my drop downs and I can't figure out why. I'm pretty sure I have everything turned off regarding showing out-of-stock items.

Can anyone give me point in the right direction? Please?