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

Results 2,181 to 2,200 of 3,609
20 May 2015, 10:51 AM
#2181
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

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

mattys:

not sure if this the same/similar issue to jagall's, but i have merged/uploaded files for stock_by_attribute_1.5.4-mc12345678_ZC154, using zen cart 1.5.3, and i cant access admin, i am getting below error:

[20-May-2015 10:14:30 UTC] PHP Fatal error: Class 'products_with_attributes_stock_admin' not found in /var/www/vhosts/jarbon.com/httpdocs/dev/includes/autoload_func.php on line 79

Are you sure that the files are loaded into the correct directoories?
That class observer is an admin observer and there should be the following file in your paths:
YOUR_ADMIN/includes/classes/observers/class.products_with_attributes_stock.php

20 May 2015, 11:27 AM
#2182
mattys avatar

mattys

Zen Follower

Join Date:
Sep 2006
Location:
North Devon, England, UK
Posts:
289
Plugin Contributions:
0

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

yep, correct, thanks for pointing that out - somehow i had missed uploading that file 'YOUR_ADMIN/includes/classes/observers/class.products_with_attributes_stock.php'

i can access admin now

however, when i add a product to cart the content area of the page goes blank https://www.jarbon.com/dev/index.php?main_page=product_info&cPath=62_73&products_id=9

problem is i am not receiving any errors for this in logs

i have double, triple checked that all files are up

I have looked at Stock By Attribute (SBA) installation script and it is showing no errors, all seems to be in order

any ideas?

20 May 2015, 2:09 PM
#2183
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

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

mattys:

yep, correct, thanks for pointing that out - somehow i had missed uploading that file 'YOUR_ADMIN/includes/classes/observers/class.products_with_attributes_stock.php'

i can access admin now

however, when i add a product to cart the content area of the page goes blank https://www.jarbon.com/dev/index.php?main_page=product_info&cPath=62_73&products_id=9

problem is i am not receiving any errors for this in logs

i have double, triple checked that all files are up

I have looked at Stock By Attribute (SBA) installation script and it is showing no errors, all seems to be in order

any ideas?

In the "check" of the files, what has been the method of checking? It may be that files didn't get transferred satisfactorily even if when looking at the directory structure they appear to be there.

Also, how were the files transferred, and suggest addressing the questions posed in the posting tips found just above the message box when generating a message (and not using the mobile template to access this site.)

20 May 2015, 2:33 PM
#2184
jagall avatar

jagall

Zen Follower

Join Date:
Mar 2011
Location:
Ireland
Posts:
286
Plugin Contributions:
0

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

mc12345678:

Would have better ideas if the generated error messages were provided. (Sorry, forgot to include the where: check the logs folder of your site.). Also if it were explained at what point of transferring files to the site were those files transferred. Are those the only two files transferred, or for some reson the last two files?

Hi ya

There is no errors generated as once i transfer these two files or either one of them namely:
config.zc154_compatibility.php
config.products_with_attributes_stock.php

my admin site goes blank, complete blank screen. To be honest I didn't do any further installation as I got a bit nervy that something else would go wrong and can't have the site down.
thanks

20 May 2015, 3:02 PM
#2185
mattys avatar

mattys

Zen Follower

Join Date:
Sep 2006
Location:
North Devon, England, UK
Posts:
289
Plugin Contributions:
0

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

mc12345678:

In the "check" of the files, what has been the method of checking? It may be that files didn't get transferred satisfactorily even if when looking at the directory structure they appear to be there.

Also, how were the files transferred, and suggest addressing the questions posed in the posting tips found just above the message box when generating a message (and not using the mobile template to access this site.)

I've been through the files several times now, all seems to be in order.

i use winmerge to merge the files and just upload one by one referring to files list (with notes)

i am using zen cart 1.5.3 and stock_by_attribute_1.5.4-mc12345678_ZC154, sorry, most posts i have included this info, the last one i didnt though

i have just PM'd you though, see if you available to do some paid work on this, i have spent days on it, and it's just about come to a head... :blink:

20 May 2015, 3:04 PM
#2186
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

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

jagall:

Hi ya

There is no errors generated as once i transfer these two files or either one of them namely:
config.zc154_compatibility.php
config.products_with_attributes_stock.php

my admin site goes blank, complete blank screen. To be honest I didn't do any further installation as I got a bit nervy that something else would go wrong and can't have the site down.
thanks

Installation of plugins (and the store in general) should not be on a file by file basis unless directed to do so. The files interact with each other and the absence of one could cause troubles.

More importantly, installation should initially be performed on a development server/location so that any potential issues can be worked out before thelive site is affected.

20 May 2015, 4:06 PM
#2187
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

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

mattys:

I've been through the files several times now, all seems to be in order.

i use winmerge to merge the files and just upload one by one referring to files list (with notes)

i am using zen cart 1.5.3 and stock_by_attribute_1.5.4-mc12345678_ZC154, sorry, most posts i have included this info, the last one i didnt though

i have just PM'd you though, see if you available to do some paid work on this, i have spent days on it, and it's just about come to a head... :blink:

I seem to recall the details provided above, but more importantly are things like: other plugins, the source of the ZC store files, was this an upgraded store, if so how, etc...

I'll get back to you shortly, but wanted to assist as able from this perspective.

20 May 2015, 7:08 PM
#2188
mattys avatar

mattys

Zen Follower

Join Date:
Sep 2006
Location:
North Devon, England, UK
Posts:
289
Plugin Contributions:
0

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

here is a list of plug ins used

ceon url mapping
google merchant senter feeder (need to uninstall)
products with attributes stock
Ceon Sage Pay Form v2.0.3
Product Listing - Layout Style column plugin (product_listing.php)
database backup mysql
export email addresses
gift wrap

out of these it is only gift wrap that has code in similar files, but i have been very careful to merge properly keeping all code intact

i'm not sure excatly what you mean by the source of the zc store files, but i recently upgraded zen cart to 1.5.3, the files from standard zen cart download

im not sure what you mean by how i upgraded, i just upgraded like you normally do,except it ook me several tries and to this point a few days trying to make sure all files are merged/uploaded correctly

26 May 2015, 11:10 AM
#2189
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

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

Thanks to some testing performed by mattys, it was identified that there was an error in the zen_get_products_stock function for when a product had multiple attributes that were grouped together as mixed attributes, and that a specific variant of the group was set to a quantity of zero, then the variant did not show out-of-stock even though there was no product.

After some testing, specifically identified, the following situation:

When a product had two attributes,

  • one with 3 values the other with 2
  • the attributes are added as a combination (a, 1; a, 2; b, 1: b, 2; c, 1; c, 2)
  • If the combination of a, 2 is set to zero, then when displaying the product on the store side, the total quantity of a is displayed instead of the expected value of zero.

While a minor fix for that one thing, the branch(es) I started of SBA 1.5.4 have been updated to contain all of the latest fixes and streamline the various corrections into the master branch. The readme.MD file now indicates that it is compatible with both ZC 1.5.3 and ZC 1.5.4. The place to go to see these is: https://github.com/potteryhouse/stock_by_attribute_1.5.4.

Working on bringing all of the fixes and capability of SBA 1.5.4 to SBA 1.5.3 so that those still using ZC 1.5.1 can also have the same benefits. The files have been locally setup and appear functional, now trying to compare the files to a fresh install so that the number of changes necessary in a merge are minimized. Identified a few minor improvements to apply to SBA 1.5.4 that will also minimize some of the core file changes as nice as it would be to make this more of a core program. :)

For what its worth, it is now possible (in SBA 1.5.4, soon to come to SBA 1.5.3) to populate multiple attribute product either by combined attributes or as multiple single attribute variants, but not yet a combination of both. Some thinking needs to be applied before using the multiple single attribute approach as it may not make sense to populate in that fashion and may cause inventory tracking issues. It may also make a lot of sense for some. One use might be something like: flowers are being sold, with or without vases. At the moment a quantity of vases as well as a quantity without vases would need to be populated (Hadn't programmed yet the possibility of one attribute option being used for inventory while the other not). But basically, vases would be populated for the product as a total number of vases (for that product), and the number of flowers of that flower type would be populated. But the inventory would not need to be set such that there were x flowers with vase and y flowers without vase, but there would need to be x flowers, y vases, and z non-vases (which would be suggested to be the same value as x flowers or larger). The code will determine the maximum number of product combination based on the minimum quantity available of each of the attributes, hence the need to ensure that the quantity of non-vase options equals or exceeds the number of flower options. This is just a single scenario and there are many others to consider. Additional coding will continue to address this and several other options and features.

29 May 2015, 2:11 AM
#2190
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

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

FYI, uploaded to the master branch (meaning no special tricks needed) an updated version 1.5.3 of SBA that incorporates the functionality available in SBA 1.5.4 but is ZC 1.5.1 centric. Available from: https://github.com/potteryhouse/stock_by_attribute_1.5.3

So those issues identified over the last several pages that were identified as being addressed in SBA 1.5.4 are now incorporated. It is still suggested to upgrade to the latest version of ZC; however, if one must continue to use an older version of ZC, at least SBA should still be able to function on it.

31 May 2015, 1:12 AM
#2191
malaperth avatar

malaperth

New Zenner

Join Date:
Dec 2013
Location:
Maine
Posts:
77
Plugin Contributions:
0

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

mc12345678:

Installation of plugins (and the store in general) should not be on a file by file basis unless directed to do so. The files interact with each other and the absence of one could cause troubles.

More importantly, installation should initially be performed on a development server/location so that any potential issues can be worked out before thelive site is affected.

Development servers are a MUST. I have no idea why except that our gov't is stupid, but, for example, the United States Postal Service website is worked on LIVE!!! The site cannot be that big, for example, I have a 2 terabyte portable drive that should be able to contain not only the USPS site code but the database code as well. If it can't, and the USPS site and databases are more than 2 terabytes, well, that explains why our gov't is so messed up. They made a change in the code about a year ago and NOONE with an account could print a shipping label for over a week. That means that literally thousands of businesses were screwed and a good portion of them had no way to ship their products. If that doesn't convince you that a development environment is necessary, I don't know what will...

Mal

31 May 2015, 1:20 AM
#2192
malaperth avatar

malaperth

New Zenner

Join Date:
Dec 2013
Location:
Maine
Posts:
77
Plugin Contributions:
0

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

mc12345678:

Thanks to some testing performed by mattys, it was identified that there was an error in the zen_get_products_stock function for when a product had multiple attributes that were grouped together as mixed attributes, and that a specific variant of the group was set to a quantity of zero, then the variant did not show out-of-stock even though there was no product.

After some testing, specifically identified, the following situation:

When a product had two attributes,

  • one with 3 values the other with 2
  • the attributes are added as a combination (a, 1; a, 2; b, 1: b, 2; c, 1; c, 2)
  • If the combination of a, 2 is set to zero, then when displaying the product on the store side, the total quantity of a is displayed instead of the expected value of zero.

While a minor fix for that one thing, the branch(es) I started of SBA 1.5.4 have been updated to contain all of the latest fixes and streamline the various corrections into the master branch. The readme.MD file now indicates that it is compatible with both ZC 1.5.3 and ZC 1.5.4. The place to go to see these is: https://github.com/potteryhouse/stock_by_attribute_1.5.4.

Working on bringing all of the fixes and capability of SBA 1.5.4 to SBA 1.5.3 so that those still using ZC 1.5.1 can also have the same benefits. The files have been locally setup and appear functional, now trying to compare the files to a fresh install so that the number of changes necessary in a merge are minimized. Identified a few minor improvements to apply to SBA 1.5.4 that will also minimize some of the core file changes as nice as it would be to make this more of a core program. :)

For what its worth, it is now possible (in SBA 1.5.4, soon to come to SBA 1.5.3) to populate multiple attribute product either by combined attributes or as multiple single attribute variants, but not yet a combination of both. Some thinking needs to be applied before using the multiple single attribute approach as it may not make sense to populate in that fashion and may cause inventory tracking issues. It may also make a lot of sense for some. One use might be something like: flowers are being sold, with or without vases. At the moment a quantity of vases as well as a quantity without vases would need to be populated (Hadn't programmed yet the possibility of one attribute option being used for inventory while the other not). But basically, vases would be populated for the product as a total number of vases (for that product), and the number of flowers of that flower type would be populated. But the inventory would not need to be set such that there were x flowers with vase and y flowers without vase, but there would need to be x flowers, y vases, and z non-vases (which would be suggested to be the same value as x flowers or larger). The code will determine the maximum number of product combination based on the minimum quantity available of each of the attributes, hence the need to ensure that the quantity of non-vase options equals or exceeds the number of flower options. This is just a single scenario and there are many others to consider. Additional coding will continue to address this and several other options and features.

You da MAN!!! As much as I am attempting to upgrade all of one of my customers sites to 1.54, the customer is overloading me with tiny changes and and (although I cannot no matter how hard I try) I cannot convince her to just chill out for a while so I can get her the "latest and greatest", but as lame as it may be, I do have a life and work to do on my property so a newer version of SBA that worked with ZC 1.5.1 would be fantastic!!! Thank you for putting in all the effort that you do, mc12345678 and whatever other coders and testers are involved! This SBA plugin is the most important thing I ever installed other than ZC itself!!!

Mal

31 May 2015, 11:48 AM
#2193
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

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

Malaperth:

You da MAN!!! As much as I am attempting to upgrade all of one of my customers sites to 1.54, the customer is overloading me with tiny changes and and (although I cannot no matter how hard I try) I cannot convince her to just chill out for a while so I can get her the "latest and greatest", but as lame as it may be, I do have a life and work to do on my property so a newer version of SBA that worked with ZC 1.5.1 would be fantastic!!! Thank you for putting in all the effort that you do, mc12345678 and whatever other coders and testers are involved! This SBA plugin is the most important thing I ever installed other than ZC itself!!!

Mal

Yes there are many programmers that over the years have worked on this plugin in one way or another. Hopefully though you have seen the post indicating that SBA for ZC 1.5.1 got updated: https://www.zen-cart.com/showthread.php?47180-Stock-by-Attribute-v4-0-addon-for-v1-3-5-1-3-9&p=1283243#post1283243

Actually have a minor update to the SBA 1.5.4 version that is expected to prevent any issues with the store if the files are loaded but the install script hasn't been run yet. This has already been addressed in the SBA 1.5.3 version.

2 Jun 2015, 4:42 AM
#2194
tronage avatar

tronage

New Zenner

Join Date:
May 2015
Posts:
32
Plugin Contributions:
0

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

I'm not sure if I'm doing something wrong or not, and I've tried my darnedness to search for a answer, but can't seem to find anything so figure I'll post my issue. If it has already been addressed I apologize, but would appreciate a link to the solution.

Anyway, I've installed version 1.5.4 of sba (found it here:https://github.com/potteryhouse/stock_by_attribute_1.5.4/tree/master). And I'm running ZC 1.5.4

Everything for the most part seems to work except for one aspect. I don't want "out of stock" displayed, nor do I want the "all selections of the attributes below this one are out of stock. please select a different option" pop-up, nor the text that appears below the attribute selections. If I have stock in the combination, all works fine, but if my stock is zero for combinations I get all sorts of out of stock popups and such. I'd like everything to look "in stock" until they add to cart, and then flag as backordered and allow them to check out as normal.

I thought I'd be able to accomplish this by setting Admin>configuration>stock I've set "check stock level" to false But it didn't fix the issue.
I also have SBA show available stock level in cart to false, and SBA show stock level on product info page false.

The goal is being a very small business some items I don't carry an inventory of, but will happily order from my supplier if one of my customers wants it. However that would take more time then if I had it in stock. So I'd like to give the impression that I carry everything, however the item they may want is backordered, but still allow them to check out. I can do this now, but I am constantly fighting pop ups and warning messages advising me to select something else, which is not the experience I want for my customers.

Hopefully it is just a simple setting that I'm over looking, and appreciate any help anyone can provide!!

2 Jun 2015, 9:47 AM
#2195
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

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

Good detail. One small one that may have been overlooked (some reason it hides so well...) Check the dynamic dropdowns configuration section. That is from where the notifications that you are seeing are controlled. The identification (left/right/neither) of the product being out-of-stock as well as a couple of other settings.

If don't want to have any indication of stock quantities on the product page, could turn off dynamic dropdowns entirely and the customer will not be made known of any stock related options until the product is added to the cart and attributes will be presented as originally "chosen" without a sequencing requirement.

2 Jun 2015, 3:34 PM
#2196
tronage avatar

tronage

New Zenner

Join Date:
May 2015
Posts:
32
Plugin Contributions:
0

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

mc12345678:

Good detail. One small one that may have been overlooked (some reason it hides so well...) Check the dynamic dropdowns configuration section. That is from where the notifications that you are seeing are controlled. The identification (left/right/neither) of the product being out-of-stock as well as a couple of other settings.

If don't want to have any indication of stock quantities on the product page, could turn off dynamic dropdowns entirely and the customer will not be made known of any stock related options until the product is added to the cart and attributes will be presented as originally "chosen" without a sequencing requirement.

Genius! I never noticed the dynamic dropdowns menu, it was so "hidden" lol! So far I think the few tinkers with those options fixed my issue!! Thanks so much! I'll let you know if any other anomalies creep in, since I'm sure there are other option menus I'm totally overlooking!

2 Jun 2015, 4:10 PM
#2197
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

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

tronage:

Genius! I never noticed the dynamic dropdowns menu, it was so "hidden" lol! So far I think the few tinkers with those options fixed my issue!! Thanks so much! I'll let you know if any other anomalies creep in, since I'm sure there are other option menus I'm totally overlooking!

I would love to run a psychological experiment to figure out why it is, but even after initial testing of the iinstall process, I too missed it. It seems placed in an appropriate location, but is not placed at the end of the list as so many other plugins do.

For further understanding, like how a default install of ZC has all (okay most) options turned on to show the available features, the same was done with this plugin for all functional options.

Glad that worked for you though. Please, if you find something that doesn't work right, post here or as an issue on github. Improvements beyond what has been discussed here also can be so posted. :)

2 Jun 2015, 6:14 PM
#2198
malaperth avatar

malaperth

New Zenner

Join Date:
Dec 2013
Location:
Maine
Posts:
77
Plugin Contributions:
0

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

First, just out of curiousity, has the other thread for the new version of SBA been abandoned? I see most of the conversation about the new version in this thread.

Next, I believe it was in the other thread that I was talking about the size of dropdowns and the truncation of their contents. I noticed, but accident actually, that the 'original' 1.5.3 version of SBA (with no changes of the two "32" settings in the attribute creation process nor any css changes to force the dropdown to a certain size) would expand to accomodate and display at least 43 characters (I apologize, I have not had time to find where the cutoff is), but when you add large amounts of characters (my customer wants one that contains descriptions of 10 items in the same dropdown!), something causes it to go back to default and only display 32 wide dropdown, but displays many more characters than shown, but does truncate at a certain point (again, I'm sorry, I did not have time to count the characters to find out at what point the truncation happens). I fully realize that the lack of full information on this is almost as much help as a kick in the ribs, but I thought I'd mention it as something may click for you.

Mal

2 Jun 2015, 7:49 PM
#2199
malaperth avatar

malaperth

New Zenner

Join Date:
Dec 2013
Location:
Maine
Posts:
77
Plugin Contributions:
0

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

Now I believe I know why the conversation is now here...

Anyway, with all the fixes and merges that have been done on Github, an old man like me gets confused... or maybe I'm just dense (my wife added that)... But, where can I get the absolute latest functional version for 1.5.1 please?

Mal

2 Jun 2015, 8:27 PM
#2200
tronage avatar

tronage

New Zenner

Join Date:
May 2015
Posts:
32
Plugin Contributions:
0

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

mc12345678:

Please, if you find something that doesn't work right, post here or as an issue on github. Improvements beyond what has been discussed here also can be so posted. :)
Sent you a PM with links to my site. The original item (with 2 attributes) works as expected, but now a new item I made with only 1 attribute is now displaying "out of stock" next to all the attributes in the dropdown. If I add a 2nd attribute to that very item then the "out of stock" messages go away. Is this a "bug" or is there somewhere else to turn off out of stock messages on single attribute items?