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

Results 1,941 to 1,960 of 3,609
25 Aug 2014, 3:07 PM
#1941
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

Maybe I didn't read enough of the documenatation (or possibly didn't read the right documentation), but I'm trying to figure out how to correct a system response that I was seeing using the beta version posted for Zc 1.5.3.

Product has two attributes, they are dependent on each other, meaning whatever is selected for the first attribute the identifies how what is available of the second attribute. (I'm sure that it could/would work the other way, that picking the second option updates the availability of the first). All available combinations of items have the additional id tied to them in the sBA table. The first option has four values, the second option also has four values When looking at the list of the first option, there are 16 items presented, each having the applicable additional model# field next to the designation. The site is locally hosted, so I do not have a link. The install was performed using the all option. No additional "optional" SQL queries were run.

In reading the immediately available on screen information, I was not able to determine if I needed to run one of the optional SQLs, nor was itclear to me if running the "all" install query included or excluded the optionl queries. I'm guessing that the response seen is expected, and that I need to run an additional optional query, if the documentation available with the otherwise latest copy downloadable from the plugins section (official copy) clearly states this, I fully apologize for askingthe question and will take due diligence to review and answer my own question. I'm wondering in the interim if someone knows the answer if they could help me out.

Thank you, and I am so glad that so much has been done to make this feature available to ZC.

27 Aug 2014, 4:13 PM
#1942
webmiss avatar

webmiss

Zen Follower

Join Date:
Feb 2006
Posts:
147
Plugin Contributions:
0

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

Just installed the mod stock_by_attribute_1.5.3 on latest version of zen-cart. When I went to the domain/admin/stock_by_attr_install.php all I got was a blank page. Now I get the same blank page when I go directly to the admin section to login. What do I do now?

27 Aug 2014, 4:26 PM
#1943
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

webmiss:

Just installed the mod stock_by_attribute_1.5.3 on latest version of zen-cart. When I went to the domain/admin/stock_by_attr_install.php all I got was a blank page. Now I get the same blank page when I go directly to the admin section to login. What do I do now?

Blank page typically results in n error log in store/logs folder. Please provide with dmin directory information obscured.

27 Aug 2014, 4:37 PM
#1944
jeking avatar

jeking

Totally Zenned

Join Date:
Oct 2005
Location:
Chicago, IL USA
Posts:
1,592
Plugin Contributions:
0

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

webmiss:

Just installed the mod stock_by_attribute_1.5.3 on latest version of zen-cart. When I went to the domain/admin/stock_by_attr_install.php all I got was a blank page. Now I get the same blank page when I go directly to the admin section to login. What do I do now?

Additionally, this plugin is not yet compatible with the 'latest version of zen-cart'. It's in the works though.

27 Aug 2014, 5:45 PM
#1945
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

jeking:

Additionally, this plugin is not yet compatible with the 'latest version of zen-cart'. It's in the works though.

mc12345678:

Blank page typically results in n error log in store/logs folder. Please provide with dmin directory information obscured.

Doh! Yes, that is true. I thought there was something "off" about the version info, but I didn't chase it before posting.

27 Aug 2014, 6:22 PM
#1946
webmiss avatar

webmiss

Zen Follower

Join Date:
Feb 2006
Posts:
147
Plugin Contributions:
0

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

Do you know how long it will be til a newer version is available? My client really needs this. And I am running zc version 1.5.3.

27 Aug 2014, 11:30 PM
#1947
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

mc12345678:

Maybe I didn't read enough of the documenatation (or possibly didn't read the right documentation), but I'm trying to figure out how to correct a system response that I was seeing using the beta version posted for Zc 1.5.3.

Product has two attributes, they are dependent on each other, meaning whatever is selected for the first attribute the identifies how what is available of the second attribute. (I'm sure that it could/would work the other way, that picking the second option updates the availability of the first). All available combinations of items have the additional id tied to them in the sBA table. The first option has four values, the second option also has four values When looking at the list of the first option, there are 16 items presented, each having the applicable additional model# field next to the designation. The site is locally hosted, so I do not have a link. The install was performed using the all option. No additional "optional" SQL queries were run.

In reading the immediately available on screen information, I was not able to determine if I needed to run one of the optional SQLs, nor was itclear to me if running the "all" install query included or excluded the optionl queries. I'm guessing that the response seen is expected, and that I need to run an additional optional query, if the documentation available with the otherwise latest copy downloadable from the plugins section (official copy) clearly states this, I fully apologize for askingthe question and will take due diligence to review and answer my own question. I'm wondering in the interim if someone knows the answer if they could help me out.

Thank you, and I am so glad that so much has been done to make this feature available to ZC.

Okay, I have reread the help page for the install (This still is applicable to the 1.5.x Beta version for ZC 1.5.3.) The optional SQL does not appear to offer a change of how the attributes are displayed. So, as I stated above, two attributes (option names), each attribute has four values. In the SBA catalog option have created a total of 16 pairings of attributes (one mixture of each pairing, no single attribute). So, let's say I have attribute #1 that has values of 1,2,3,and 4. attribute #2 has values a, b,c,and d.

Therefore I have 1a, 1b, 1c, 1d, 2a, 2b, etc... Each of those has a customid filled in. (For reproduction, technically the customid is a number or if type cast to a number would have the same "result") When I go to the product_info page, the first attribute listed is populated with in essence all available combinations...

See attached image, if able. :)

Attachment 14463

For other information, the first attribute (misspelled) has a lower option number than the second. The sort order numbers are in the same sequence.

The installation is a vanilla ZC 1.5.3 hotfix 1, with mysql database backup, display logs, and superglobals installed.

I have noticed that after I make a selection (using firefox) that there is an error that is reported regarding the onchange option. that selectItemImage is not defined... Potentially a typing error? missing space? (Action is called on line 51 of includes\functions\extra_functions\products_with_attributes.php) No additional upgrade of jquery has been made beyond what is included in the beta plugin. Internet search has not revealed a similar function yet. Will look to see if that function is covered in the official ZC available version of SBA 1.5.3, but thought I would report it if there is something to be addressed for overall functionality.

28 Aug 2014, 2:18 AM
#1948
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

mc12345678:

Okay, I have reread the help page for the install (This still is applicable to the 1.5.x Beta version for ZC 1.5.3.) The optional SQL does not appear to offer a change of how the attributes are displayed. So, as I stated above, two attributes (option names), each attribute has four values. In the SBA catalog option have created a total of 16 pairings of attributes (one mixture of each pairing, no single attribute). So, let's say I have attribute #1 that has values of 1,2,3,and 4. attribute #2 has values a, b,c,and d.

Therefore I have 1a, 1b, 1c, 1d, 2a, 2b, etc... Each of those has a customid filled in. (For reproduction, technically the customid is a number or if type cast to a number would have the same "result") When I go to the product_info page, the first attribute listed is populated with in essence all available combinations...

See attached image, if able. :)

Attachment 14463

For other information, the first attribute (misspelled) has a lower option number than the second. The sort order numbers are in the same sequence.

The installation is a vanilla ZC 1.5.3 hotfix 1, with mysql database backup, display logs, and superglobals installed.

I have noticed that after I make a selection (using firefox) that there is an error that is reported regarding the onchange option. that selectItemImage is not defined... Potentially a typing error? missing space? (Action is called on line 51 of includes\functions\extra_functions\products_with_attributes.php) No additional upgrade of jquery has been made beyond what is included in the beta plugin. Internet search has not revealed a similar function yet. Will look to see if that function is covered in the official ZC available version of SBA 1.5.3, but thought I would report it if there is something to be addressed for overall functionality.

FYI, Haven't proven it yet, but I think that the revised SQL statement in the includes/modules/YOUR_TEMPLATE/attributes.php file at lines 101-114 and removal of the previous 122-126 may have caused this issue. Basically thinking (again no proof) that the new SQL returns more lines of data than are applicable whereas the previous first returned a "correct" number and then the second sql used data from the first instead of attempting to push all the response into one sql response... This seems to be the only real change in the file that potentially could affect the quantity of items in a list. Other changes were to identify new/different table abbreviations.

Curious what the affect will be to restore that sql statement and the follow-on changes made to accomodate. Seems to me that it should work like it used to... unless someone saw an issue with the way it worked before?

28 Aug 2014, 4:48 AM
#1949
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

mc12345678:

FYI, Haven't proven it yet, but I think that the revised SQL statement in the includes/modules/YOUR_TEMPLATE/attributes.php file at lines 101-114 and removal of the previous 122-126 may have caused this issue. Basically thinking (again no proof) that the new SQL returns more lines of data than are applicable whereas the previous first returned a "correct" number and then the second sql used data from the first instead of attempting to push all the response into one sql response... This seems to be the only real change in the file that potentially could affect the quantity of items in a list. Other changes were to identify new/different table abbreviations.

Curious what the affect will be to restore that sql statement and the follow-on changes made to accomodate. Seems to me that it should work like it used to... unless someone saw an issue with the way it worked before?

I see part of the issue... Want to have the quantity associated available and possibly the customid; however, access to that information becomes somewhat more difficult/unreliable without further scripting to reload the other dropdown(s) when the one is selected... Hmm.. Works fine if there is one attribute, but when starting to mix them? Well, seems that doesn't update the other when the one is selected..

So, found a partial solution... That is without additional javascript/ajax... Essentially if the product has one attribute tracked by SBA the solution would provide the ability to see the remaining quantity and designated customid for that product, if there is more than one attribute associated through SBA with the product then only the attribute's value name would be displayed...

Thinking of some alternatives, either the page reloads after an attribute is changed with the currently selected options passed to the new load, or some other means of updating (javascript or otherwise) is implemented to populate the remaining field(s).

The only thing that in my opinion/understanding is that it seems that the customid is intended to be used to designate a combination or particular series of attributes and therefore doesn't necessarily make sense on an individual basis when combined with others... I guess I could be wrong about that and maybe there is a grander scheme, but I've been pondering this aspect for a long time. :/ For the example provided in the previous image, I attempted to designate a quantity of the individual first attribute that also had a combination with the second attribute and can not see how that addition impacted anything other than populating a record in the database. Maybe once I have "sold out" of one or more of its combination attributes it may be clearer...

I'll present my solution if there is any interest soon, but don't really want to confuse things if there is a direction being headed... Don't need to go making more variants of this program which is finally coming together.

28 Aug 2014, 3:01 PM
#1950
potteryhouse avatar

potteryhouse

Zen Follower

Join Date:
Jun 2012
Location:
Florida
Posts:
123
Plugin Contributions:
0

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

mc12345678:

I see part of the issue... .

I'll present my solution if there is any interest soon, but don't really want to confuse things if there is a direction being headed... Don't need to go making more variants of this program which is finally coming together.

Hi,

I have been trying to resolve this issue for sometime (and a related Orders and Basket thing I see), with limited susses. I am currently working a significant change (new concept) to the mode locally as a possible solution. But that may not end up working, so if you have another option please send what you think so we can have other perspectives. As a note, this mod has never to my knowledge supported multiple drop-downs that change when one has a selection change. I think others have used a separate filter plugin to do that, but that plugin does not work well with current changes, so I hope to build that functionality into the mod.

We (jeking and I) have started working together on this, there is a GitHub working copy available, but it is not for formal release, just development. Obviously when a production version is available it will be placed in the normal Zen Cart Plugins.

28 Aug 2014, 3:06 PM
#1951
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

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

webmiss:

Do you know how long it will be til a newer version is available? My client really needs this. And I am running zc version 1.5.3.

Free modules are built by volunteers on their own time.. So when it is available will be dependent on the author's schedule. If you are following this thread, you can see dev and testing are in progress... So you will just have to wait patiently while this process plays itself out.. That's how it usually works with free modules.. If your client REALLY needs this now and you don't want to wait, you can consider other options (commercial modules, paying a dev to update for you, etc..)...

28 Aug 2014, 3:51 PM
#1952
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

potteryhouse:

Hi,

I have been trying to resolve this issue for sometime (and a related Orders and Basket thing I see), with limited susses. I am currently working a significant change (new concept) to the mode locally as a possible solution. But that may not end up working, so if you have another option please send what you think so we can have other perspectives. As a note, this mod has never to my knowledge supported multiple drop-downs that change when one has a selection change. I think others have used a separate filter plugin to do that, but that plugin does not work well with current changes, so I hope to build that functionality into the mod.

We (jeking and I) have started working together on this, there is a GitHub working copy available, but it is not for formal release, just development. Obviously when a production version is available it will be placed in the normal Zen Cart Plugins.

I've identified a solution to the issue of the custid not showing in those areas; however, am awaiting approval to share.

28 Aug 2014, 4:13 PM
#1953
potteryhouse avatar

potteryhouse

Zen Follower

Join Date:
Jun 2012
Location:
Florida
Posts:
123
Plugin Contributions:
0

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

mc12345678:

I've identified a solution to the issue of the custid not showing in those areas; however, am awaiting approval to share.

When you do get permission from your client or whenever, I would be interested in looking at the code.
Thanks.

28 Aug 2014, 5:03 PM
#1954
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

potteryhouse:

When you do get permission from your client or whenever, I would be interested in looking at the code.
Thanks.

Will be glad to as permitted. Interested in some of the newer features that are being considered such as the new "title" feature.

Btw, trying to figure out, how is one allowed to populate the custid after a "group" of attribute combinations has been generated (without significant other processes)? Did I understand correctly that this could be done through the export/import process?

28 Aug 2014, 5:18 PM
#1955
potteryhouse avatar

potteryhouse

Zen Follower

Join Date:
Jun 2012
Location:
Florida
Posts:
123
Plugin Contributions:
0

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

mc12345678:

Will be glad to as permitted. Interested in some of the newer features that are being considered such as the new "title" feature.

Btw, trying to figure out, how is one allowed to populate the custid after a "group" of attribute combinations has been generated (without significant other processes)? Did I understand correctly that this could be done through the export/import process?

Yes the Export Import was created for another users needs, it allows the "bulk" changing of the Qty and Custom ID. Depending on how other fields play out such as the title/Description, parentid, childid, and siblingid (new concepts) they may be available in the future if it works the way I hope.

29 Aug 2014, 2:13 AM
#1956
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

potteryhouse:

Yes the Export Import was created for another users needs, it allows the "bulk" changing of the Qty and Custom ID. Depending on how other fields play out such as the title/Description, parentid, childid, and siblingid (new concepts) they may be available in the future if it works the way I hope.

Interesting concepts, curious of their function. At least the sibling field. Seems like it is just an additional field that must be managed that can also be populated/determmined by looking at the parent's children.

Btw, I think I found at least one reason this plugin has not worked with multiple attributes. In the order class, when checking stock quantity for an attribute as compared to the quantity of the product, there is a search that is performed against the products with stock attributes table that is basically bound to fail and disable the product if one attribute has been exhausted. (A situation that I encountered in testing.). The resolution looks like it will take at least three queries in series that are dynamically built depending on the results of a previous query. This code is where products_status is set to 0. I think (since I am away from my computer) that it is in the function that starts with create.

29 Aug 2014, 2:59 AM
#1957
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

Because this portion of the code deactivates the product if the attribute is exhausted, my plan is to rewrite it so that the only time the product is to be disabled is when there are no attribute options available. Then it will be on to the next applicable attribute disablement/reporting to ensure that the customer can better understand what is available and what is out-of-stock.

As a reminder I had modified the system response back to the way it was before that I only have one instance of each of the first attributes, and one of any subsequent attribute, not a combination/long listing like I showed up above. This condition is different than the current beta code.

As far as code modifications and "previous" versions, yes, there was javascript applied to at least one version that was to update other attribute selection boxes upon picking one attribute selection. IMHO, all well and good, but I prefer to first program from a non-javascript perspective as that is the base work, then addon javascript. Call it old school or something, but if someone doesn't want to run javascript on their computer I'd rather be sure they can make a purchase than prevent them from doing so...

29 Aug 2014, 11:47 AM
#1958
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

Let me see if I can ask this question coherently, because it is a potentially complicated condition.

Trying to evaluate whether the products stock by attribute table is properly populated for a given product. Already have seen in the forum that when working with more than one attribute for the product that some have either properly or improperly added a product variant to the table with only one attribute tracked (or at least a number of attributes less than the full quantity available).

The question comes to what constitutes the products with attributes stock table being properly populated? (Correct number of attributes included in the combination of attributes.). For example if a product has three attributes, is it acceptable for only two to be considered for stock tracking purposes/existing functionality of the module. What conditions should automatically be considered as non-attributes to consider (ie read only only?)?

It's already evident that there are insufficient means of tracking if an attribute has been "turned off" from being important for stock tracking purposes as this would require an additional table to address properly/sufficiently (attribute when associated with a specific product is not to be considered). Sure it could be stuffed into a field of an existing table; however, that violates normalization principles of databases. (Yes I know that there are more than likely cases in the ZC default coding that also don't follow strict normalization, in fact this plugin doesn't either, but...)

Ideally, once a product is populated with it's stock attributes, the number of attributes to consider won't change, but I'm also trying to address "knowing" that there are not discrepancies in the database population. For example if a product is originally populated with three types of attributes, and then in the future one of those is removed, what also removes that attribute tracking from the database, the user only? If the same product having three attributes, has an additional attribute added to it, what happens and does that too need to be adjusted?

The way I was considering approaching the product is out-of-stock (needing to be made inactive) was to look at the maximum number of attributes being tracked and if the results from the database containing that number of attributes for the product indicated no available quantity when searched on the value of one of the tracked attributes, then to disable the product. Currently it disables the product if there is no quantity returned when there is no quantity for the combination of the attribute and I think it is/was all of it's siblings of that one attribute joined together. Ie, expecting that every possible attribute value of the product is considered for tracking the exhaustion of the product.

31 Aug 2014, 10:25 AM
#1959
webmiss avatar

webmiss

Zen Follower

Join Date:
Feb 2006
Posts:
147
Plugin Contributions:
0

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

This is what I found in the error logs.
[27-Aug-2014 13:07:49] PHP Fatal error: Call to undefined function zen_get_ip_address() in /dir/mydir/public_html/admin-directory/includes/init_includes/init_sessions.php on line 34

31 Aug 2014, 10:31 AM
#1960
webmiss avatar

webmiss

Zen Follower

Join Date:
Feb 2006
Posts:
147
Plugin Contributions:
0

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

Is there actually a commercial module for zc verion 1.5.3?