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

Results 1,161 to 1,180 of 3,609
03 May 2011, 14:16
#1161
swamyg1 avatar

swamyg1

Zen Follower

Join Date:
Dec 2008
Location:
San Fran
Posts:
382
Plugin Contributions:
0

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

Does anyone know why I occassionally have to press the "Sync product quantity" button next to the product? If I don't do this, my entered stock values are not being reflected on the front end... Is this something that's necessary with the ajax version? The previous versions did not require this to the best of my knowledge.

08 May 2011, 04:56
#1162
buzzworm2 avatar

buzzworm2

New Zenner

Join Date:
Nov 2008
Posts:
16
Plugin Contributions:
0

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

Is there a bug regarding the sort column in SBA 1-4-13? This is the only version of SBA I have tried but when I try to add stock on the "Products with Attributes Stock" page I get this error:

1364 Field 'sort' doesn't have a default value
in:
[insert into jfaz_products_with_attributes_stock (products_id,stock_attributes,quantity) values (68,"1",6) ON DUPLICATE KEY UPDATE stock_attributes = "1", quantity = 6]
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.

Looking at the code I see the sort column is in fact defined as "NOT NULL" by the stock_attribute.sql file in the download. However, the insert statements in the file admin/products_with_attributes_stock.php do not populate the "sort" column. As a test, I altered the *products_with_attributes_stock.sort column to have a default of 0. This fixed the error but of course every record has "0" in this column which probably defeats whatever purpose this column has.

Does anyone know what the "sort" column is used for and why the table definition doesn't match the insert statements?

thanks

11 May 2011, 05:28
#1163
ellivir avatar

ellivir

Zen Follower

Join Date:
Sep 2005
Posts:
444
Plugin Contributions:
0

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

After installing Stock by Attributes 1.4.13, the shipping addresses (all 3 in the customer orders in admin) disappeared. In the place of them, there is only a comma! Since orders.php has been edited for this module, there may be some bug in it. Has anyone else noted this?

Elli

14 May 2011, 04:42
#1164
evaudio avatar

evaudio

New Zenner

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

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

OK so apparently i am not installing this mod correctly. I followed the instructions, but it does not stat where to put the ajax folder files at. I figured it was just into the main area, but apparently not.

I am using 1.3.9h and followed everything to the letter. I did have to add a /* - */ between line 3007 - 3020, i had to do this so the admin area would show back up.

I am selling a bunch of shirts, and it is a pain in the rear to keep track of and this would help a ton.

15 May 2011, 14:57
#1165
athena avatar

athena

Totally Zenned

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

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

swamyg1:

Does anyone know why I occassionally have to press the "Sync product quantity" button next to the product? If I don't do this, my entered stock values are not being reflected on the front end... Is this something that's necessary with the ajax version? The previous versions did not require this to the best of my knowledge.

We are double checking the sync procedure also as we noticed this.....i think you have it installed correctly. We do like the newer feature of being able to change multiple attributes at a time (since our last upgrade) so it is worth the effort.

15 May 2011, 15:16
#1166
evaudio avatar

evaudio

New Zenner

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

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

Does this mod generate any type of report that can be printed or emailed?

15 May 2011, 15:23
#1167
athena avatar

athena

Totally Zenned

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

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

evaudio:

OK so apparently i am not installing this mod correctly. I followed the instructions, but it does not stat where to put the ajax folder files at. I figured it was just into the main area, but apparently not.

I am using 1.3.9h and followed everything to the letter. I did have to add a /* - */ between line 3007 - 3020, i had to do this so the admin area would show back up.

I am selling a bunch of shirts, and it is a pain in the rear to keep track of and this would help a ton.

Hi...I'm not an expert...but you are right, the ajax folder is placed in the the same folder as your admin.

When the mod shows a file structure with "admin" it means the file you renamed for your own admin.

So:

admin (aka "your admin folder")
ajax
includes

means they should look just like that in your directory.

I did this install with three issues that we corrected by starting over again...and again...but it works pretty flawlessly:

First issue: Lots of mods installed so BTW only had to make the one edit to orders.php required by the mod

Second issue: needed to run the extra sql statement as we were upgrading: update_1_4_10.sql

Third issue: the file /includes/modules/pages/shopping_cart/header_php.php in the newest version still wrecks havoc with the stock totals...has been updated but still has issues with things being added to the cart that do not have attributes after items that do have attributes, showing out of stock. see my post above for the file to replace for that.

16 May 2011, 22:43
#1168
jazdeep avatar

jazdeep

New Zenner

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

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

Hi,

where is this file located? I can't seem to find it ...

products_with_attributes_stock.php

thanks

16 May 2011, 22:45
#1169
jazdeep avatar

jazdeep

New Zenner

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

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

:oops:nvm found it im new at this haha

22 May 2011, 17:28
#1170
ellivir avatar

ellivir

Zen Follower

Join Date:
Sep 2005
Posts:
444
Plugin Contributions:
0

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

athena:

Hi...

First issue: Lots of mods installed so BTW only had to make the one edit to orders.php required by the mod

Did you experience also this:
"After installing Stock by Attributes 1.4.13, the shipping addresses (all 3 in the customer orders in admin) disappeared. In the place of them, there is only a comma! Since orders.php has been edited for this module, there may be some bug in it. Has anyone else noted this?"

Maybe it would be worth to try to take an original 1.39h file and make the modification manually for it. Something must be wrong with the package file.

Elli

22 May 2011, 22:15
#1171
kuroi avatar

kuroi

Totally Zenned

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

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

ellivir:

Did you experience also this:
"After installing Stock by Attributes 1.4.13, the shipping addresses (all 3 in the customer orders in admin) disappeared. In the place of them, there is only a comma! Since orders.php has been edited for this module, there may be some bug in it. Has anyone else noted this?"

Maybe it would be worth to try to take an original 1.39h file and make the modification manually for it. Something must be wrong with the package file.

ElliThis doesn't sound like anything that Stock By Attributes would do. It makes no attempt to edit the order at all.

It's interaction with it is simply to check if there's enough attribute stock to fulfil it, or whether it needs to warn that there isn't.

So if your order is getting corrupted, I think you need to look elsewhere.

23 May 2011, 13:16
#1172
athena avatar

athena

Totally Zenned

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

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

Did you experience also this:
"After installing Stock by Attributes 1.4.13, the shipping addresses (all 3 in the customer orders in admin) disappeared. In the place of them, there is only a comma! Since orders.php has been edited for this module, there may be some bug in it. Has anyone else noted this?"

Maybe it would be worth to try to take an original 1.39h file and make the modification manually for it. Something must be wrong with the package file.

Elli

I struggled with many of the mods being built with an earlier version of zencart...meaning orders.php from 1.3.9c not 1.3.9h...so yes, all edits should be done manually....some are just impossible with other mods, but SBA is a pretty simple edit.

28 May 2011, 16:21
#1173
buzzworm2 avatar

buzzworm2

New Zenner

Join Date:
Nov 2008
Posts:
16
Plugin Contributions:
0

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

buzzworm2:

Is there a bug regarding the sort column in SBA 1-4-13? This is the only version of SBA I have tried but when I try to add stock on the "Products with Attributes Stock" page I get this error:

1364 Field 'sort' doesn't have a default value
in:
[insert into jfaz_products_with_attributes_stock (products_id,stock_attributes,quantity) values (68,"1",6) ON DUPLICATE KEY UPDATE stock_attributes = "1", quantity = 6]
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.

Looking at the code I see the sort column is in fact defined as "NOT NULL" by the stock_attribute.sql file in the download. However, the insert statements in the file admin/products_with_attributes_stock.php do not populate the "sort" column. As a test, I altered the *products_with_attributes_stock.sort column to have a default of 0. This fixed the error but of course every record has "0" in this column which probably defeats whatever purpose this column has.

Does anyone know what the "sort" column is used for and why the table definition doesn't match the insert statements?

thanks

Hi everybody, am I the only one with this problem? It seems like a bug in SBA 1.4.13 where the INSERT statement leaves out the "SORT" column, yet the "SORT" column is defined as "NOT NULL" in the "PRODUCTS_WITH_ATTRIBUTES" table.

Please let me know if I'm all wet on this!

thanks

31 May 2011, 14:09
#1174
athena avatar

athena

Totally Zenned

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

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

you are not the only one...it is a bug....there is a temporary fix in my posts, until they fix the mod, if you do a search in this thread for it.

07 Jun 2011, 23:09
#1175
ccqccq avatar

ccqccq

New Zenner

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

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

Hi all-

I'm a relatively new ZenCart user and also Stock By Attributes. Everything was going smashingly with my 1.3.9h ZenCart and then I tried to install Stock By Attributes 1.4.13 (both current as of today). After messing with things for far longer then I care to admit, I was still getting various errors. After pouring through this thread and others, I attempted many fixes to no avail and was on the verge of giving up.

Long story short, I figured out my problem and I wanted to relay it here in case it helps anyone else.

Being the good programmer that I am, I renamed any file that the Stock By Attributes distribution was going to overwrite.
Those files:
admin/orders.php
admin/includes/functions/general.php
includes/classes/order.php
includes/functions/functions_lookups.php
includes/modules/pages/checkout_shipping/header_php.php
includes/modules/pages/shopping_cart/header_php.php

..I renamed them to ordersOLD.php, generalOLD.php, etc. Then, I did the install of the Stock By Attributes module.

Maybe that's a basic PHP error on my part, but that was the cause of all of my problems. And I think I experienced just about every problem with this mod! As soon as I deleted all of the old copies, everything worked fantastically. VERY FRUSTRATING! :censored:

But, at least I found the error. Perhaps it's basic PHP stuff with filename conventions, but I did not know that those names would cause confusion on the part of the webserver. It appeared to me that the server was reading the old file even though I renamed it. Perhaps it was a caching error of some sort, I'm not exactly sure. What I do know is that things IMMEDIATELY worked flawlessly once I blew away my backup copies. From here on out, I will keep my backups in an entirely different place!

:oops:

Too bad it took so long and so much pain to figure out. But maybe this will help someone else.

Cheers,
--ccq

08 Jun 2011, 07:48
#1176
kuroi avatar

kuroi

Totally Zenned

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

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

ccqccq:

...
I renamed them to ordersOLD.php, generalOLD.php, etc. Then, I did the install of the Stock By Attributes module.

Maybe that's a basic PHP error on my part, but that was the cause of all of my problems. And I think I experienced just about every problem with this mod! As soon as I deleted all of the old copies, everything worked fantastically. VERY FRUSTRATING! :censored:

But, at least I found the error. Perhaps it's basic PHP stuff with filename conventions, but I did not know that those names would cause confusion on the part of the webserver. It appeared to me that the server was reading the old file even though I renamed it
....
That's exactly what would have been happening. It's been covered repeatedly earlier in the thread, but not for a while so worth repeating ... it's very bad practise to mix backups with live files. Your web server should have only the files you actually want to be executed.

Zen Cart loads some files by location not by name. For this mod that affects the classes, so they will be loaded, whether you intend it to be (live file) or not (backup).

Yes, keeping backups is a good idea, but keep them on your development machine or in your code repository, not on your live site.

(... and run a mile from FTP clients that automatically create a backup file for you)

08 Jun 2011, 14:57
#1177
athena avatar

athena

Totally Zenned

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

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

Are you saying then that this mod works right out of the box, so to speak?

I've tried in vain to get attention of who modified the most recent version, .13 to no avail as there is still an issue for most of us here with stock for items in the cart showing zero when it is listed underneath an item with attributes.

The solution, albeit imperfect, is to keep the old /includes/modules/pages/shopping_cart/header_php.php

Can someone in the know set me straight on this because my impression is that this most recent version of .13 is flawed.

I continue to advise folks to do what I did while waiting for this version to undergo correction.

08 Jun 2011, 15:59
#1178
kuroi avatar

kuroi

Totally Zenned

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

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

athena:

Are you saying then that this mod works right out of the box, so to speak?

Alas, not one that I can answer. We (Kuroi) supported this mod to a professional standard for several years, but stopped about 3 years back when other people started hacking their pet features into it without proper testing. We've not used the publicly released versions since.

08 Jun 2011, 16:11
#1179
athena avatar

athena

Totally Zenned

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

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

Well...thank you so much for the original...it has served us well.

I would be willing to help anyone with the know how to test and perfect this mod. Just let me know.

08 Jun 2011, 17:04
#1180
ccqccq avatar

ccqccq

New Zenner

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

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

Athena-

From what I can tell, the answer is yes, the mod works right out of the box. I had put in your fix below at one point but then taken it back out. I just double checked my version of the header and it is the version from the SBA 1.4.13.

Now, as I mentioned, I put in a bunch of fixes and backed them out, and I'm fairly sure I am running "out of the box" but not totally certain.

I may try and do a ground up install of ZenCart and SBA and see what happens - if I have the time. If I do, I will report back with my results.

--ccq

athena:

Are you saying then that this mod works right out of the box, so to speak?

I've tried in vain to get attention of who modified the most recent version, .13 to no avail as there is still an issue for most of us here with stock for items in the cart showing zero when it is listed underneath an item with attributes.

The solution, albeit imperfect, is to keep the old /includes/modules/pages/shopping_cart/header_php.php

Can someone in the know set me straight on this because my impression is that this most recent version of .13 is flawed.

I continue to advise folks to do what I did while waiting for this version to undergo correction.