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

Results 1,961 to 1,980 of 3,609
31 Aug 2014, 12:33 PM
#1961
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

webmiss:

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

Didn't by chance uninstall the plugin by removing all the files that were a part of the plugin from your store did you?

That missing function is defined in. Two different (but similar) files:
admin/includes/functions/general.php

And

includes/functions/functions_general.php

If either file is missing or doesn't have that function, then the file appropriate to the path should be uploaded again. The function described (zen_get_ip_address) was new to the admin side in ZC 1.5.3, so if the file is there and it looks complete, but is missing the function, then perhaps is from an older version of ZC. (Ie, the current release of this plugin I believe uses/modifies that file)

31 Aug 2014, 1:03 PM
#1962
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:

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

The undefined function is not used by this plugin so is being caused by some other problem.

I'm not aware of a commercial module but you could hire someone to write on for you.

6 Sep 2014, 4:03 AM
#1963
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

Okay, I haven't specifically received direction, but would hate for this product to undergo a significant change over the weekend to resolve something like this. (Although perhaps the result would be an even better product). Regarding the customid, I don't see why I can't provide guidance to find the solution.

Take a look at what is needed in the zen_get_customid function and take a look at what is being fed to it. I believe either of the two of you would be able to narrow down the issue with that.

9 Sep 2014, 2:01 PM
#1964
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:

Okay, I haven't specifically received direction, but would hate for this product to undergo a significant change over the weekend to resolve something like this. (Although perhaps the result would be an even better product). Regarding the customid, I don't see why I can't provide guidance to find the solution.

Take a look at what is needed in the zen_get_customid function and take a look at what is being fed to it. I believe either of the two of you would be able to narrow down the issue with that.

Have a look at updates on the branch Update3 at

For Zen Cart version 1.5.1
https://github.com/jeking928/stock_by_attribute_1.5.3

For Zen Cart version 1.5.3
https://github.com/jeking928/stock_by_attribute_1.5.4

9 Sep 2014, 2:03 PM
#1965
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

For anyone interested we have a GitHub Development area.

For Zen Cart version 1.5.1
https://github.com/jeking928/stock_by_attribute_1.5.3

For Zen Cart version 1.5.3
https://github.com/jeking928/stock_by_attribute_1.5.4

These should address many of the issues found, but these changes need testing before they can be uploaded to the Zen Cart Plugins.

There is also an issues tracking feature on GitHub for each of these branches, if anyone has a reproducible issue, they can create a bug report, but please make sure you include details for reproducing the issue and what the symptoms are when the bug is present.

10 Sep 2014, 5:04 AM
#1966
kevin205 avatar

kevin205

Totally Zenned

Join Date:
Dec 2012
Posts:
607
Plugin Contributions:
0

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

Has anyone found a solution and the best way to mass delete specific attributes from products that their attributes have been discontinued?

10 Sep 2014, 2:56 PM
#1967
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

Kevin205:

Has anyone found a solution and the best way to mass delete specific attributes from products that their attributes have been discontinued?

This should be easy with the correct query, send me a scenario of what you think is expected, I can generate a query and if it works add it to the new version we are working as one of the optional SQL's, or in some other way that you think makes sense.

What I would need to know is when you place a product out of stock will it always be marked as inactive, will it always need to have the attributes in the SBA removed, things like that are the kind of items I would need to know in the scenario that will work for you overall. I have a guess as to what to expect, but it is best to see what you will be expecting. You could add this as an issue in the Git project so it can be tracked.

https://github.com/jeking928/stock_by_attribute_1.5.3/issues

10 Sep 2014, 6:07 PM
#1968
kevin205 avatar

kevin205

Totally Zenned

Join Date:
Dec 2012
Posts:
607
Plugin Contributions:
0

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

potteryhouse:

This should be easy with the correct query, send me a scenario of what you think is expected, I can generate a query and if it works add it to the new version we are working as one of the optional SQL's, or in some other way that you think makes sense.

What I would need to know is when you place a product out of stock will it always be marked as inactive, will it always need to have the attributes in the SBA removed, things like that are the kind of items I would need to know in the scenario that will work for you overall. I have a guess as to what to expect, but it is best to see what you will be expecting. You could add this as an issue in the Git project so it can be tracked.

https://github.com/jeking928/stock_by_attribute_1.5.3/issues
Thank you for the reply.

I will do that.

17 Sep 2014, 2:12 PM
#1970
kevin205 avatar

kevin205

Totally Zenned

Join Date:
Dec 2012
Posts:
607
Plugin Contributions:
0

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

Can products_model be edited/revised using EP4? If yes which module?

Thank you.

17 Sep 2014, 2:32 PM
#1971
kevin205 avatar

kevin205

Totally Zenned

Join Date:
Dec 2012
Posts:
607
Plugin Contributions:
0

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

Sorry posted the wrong thread.

8 Oct 2014, 3:03 AM
#1972
tuxy avatar

tuxy

New Zenner

Join Date:
Sep 2013
Location:
Right Here
Posts:
16
Plugin Contributions:
0

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

Greetings.
I'm currently using:
Zen-Cart 1.5.1
Stock By Attributes (SBA) Version 1.5.3

After adding new products to the database, I can run the "Optional SQL" script and it creates entries in the new products_with_attributes_stock table, based on current products that have attributes associated with them. This seems to work correctly.

What I would like to do at this point is use the SBA "Export Table Data" script to export the SBA table data, enter the Unique ID and stock values for each variant, then import that data using the "Import Table Data" script.

The problem I'm having is that when I run the "Export Table Data" script, the script is exporting data from old products that were previously in the table/database, but have now been deleted from Zen-Cart.

How can I ensure the data that gets exported only contains the current products in Zen-Cart and not old products that have been discontinued and deleted from Zen-Cart? Is there a step I'm missiing that syncs the SBA table data to the current products list in Zen-Cart?

There must be a way to do this because products can be discontinued at anytime.

Thanks for any help that can be given!

Tuxy

9 Oct 2014, 2:19 AM
#1973
tuxy avatar

tuxy

New Zenner

Join Date:
Sep 2013
Location:
Right Here
Posts:
16
Plugin Contributions:
0

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

More information that might be helpfull..

When I click the menu option "Catalog/Products With Attributes Stock", it displays the products correctly. It displays all the products that have an attribute associated with them.

I assumed that running the "Export Table Data" script from the "Configuration/Products With Attributes Setup" menu, I would get the same list as I do from the "Catalog/Products With Attributes Stock" menu, but that is not the case. When I Export Table Data, I get old products that have been deleted from the Zen-Cart database.

Does this make sense? Is anyone else using the Export/Import feature of this module?

Is this the correct place to be asking this question?

Thanks!

10 Oct 2014, 4:24 AM
#1974
tuxy avatar

tuxy

New Zenner

Join Date:
Sep 2013
Location:
Right Here
Posts:
16
Plugin Contributions:
0

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

I just discovered this module is being developed on GitHub. I'll take this issue there for further discussion.

12 Oct 2014, 4:44 PM
#1975
wmorris avatar

wmorris

Totally Zenned

Join Date:
Aug 2007
Location:
Amarillo, Tx
Posts:
1,675
Plugin Contributions:
0

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

I am currently using ZenCart Version 1.5.3 and I uploaded everything up to the site now my admin is white nothing. Plus when I tried to install the SQL file I keep getting errors. Why?

12 Oct 2014, 5:07 PM
#1976
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

morrisgiftshop:

I am currently using ZenCart Version 1.5.3 and I uploaded everything up to the site now my admin is white nothing. Plus when I tried to install the SQL file I keep getting errors. Why?

The current version of this plugin is not compatible with Zen Cart 1.5.3 yet. There is a beta version on Github, mentioned earlier in this thread.

20 Oct 2014, 6:29 PM
#1977
rrzc avatar

rrzc

New Zenner

Join Date:
May 2010
Posts:
52
Plugin Contributions:
0

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

I'm using the latest version of this module. 'SBA Display Custom ID > Display the Custom ID value in history, checkout, and order forms' is set to true. Setting this to true also shows the custom ID on the product info pages beside each attribute, which I don't want. What the best way to hide the custom ID on the product info pages?

22 Oct 2014, 12:58 AM
#1978
retched avatar

retched

Totally Zenned

Join Date:
Jun 2007
Location:
Bronx, New York, United States
Posts:
942
Plugin Contributions:
3

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

Just a suggested edit, not sure if it was suggested. I kept trying to add quantities of 0 using the "Add Quantity for Product Variant" link on the SBA Page in the admin area. Each time I chose to add 0, I got an error. "Missing or bad quantity." This may be because 0 is registered as null when it is run against line 216's:

elseif( !is_numeric((int)$quantity) || is_null($quantity) ){

So I changed that to the following:

elseif( !is_numeric((int)$quantity) || zen_not_null($quantity) ){

and that fixed my problem of being able to add a product with zero quantity using the wizard.

22 Oct 2014, 4:05 AM
#1979
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

retched:

Just a suggested edit, not sure if it was suggested. I kept trying to add quantities of 0 using the "Add Quantity for Product Variant" link on the SBA Page in the admin area. Each time I chose to add 0, I got an error. "Missing or bad quantity." This may be because 0 is registered as null when it is run against line 216's:

elseif( !is_numeric((int)$quantity) || is_null($quantity) ){

> 
> So I changed that to the following:
> 
> ```
elseif( !is_numeric((int)$quantity) || zen_not_null($quantity) ){

and that fixed my problem of being able to add a product with zero quantity using the wizard.

Honestly, looking at that snippet of code alone, it doesn't make sense. If the variable that is type cast to be an integer isn't a number or (as originally written) the value is actully null then do the next step.
Now it reads if the variable that is type cast to be an integer isn't a number or the value is actually NOT null then do the next step. It seems as if that section is meant to address situations that do not add value to the process. Why is it important to add a zero value for an attribute quantity that does not exist? That's basically what is being done.

If it is desired to avoid going down the path of the value zero resolving to null then the more specific solution would be:
If (!is_numeric((int)$quantity) || (is_null($quantity) && $quantity !== 0)) {

Note the use of the not identity instead of evaluating against something thatmay be equivalent to zero. (Ie. False).

3000

2 Nov 2014, 3:37 PM
#1980
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

I'm sorry if this has been asked and answered, but it is impossible to search through a particular thread.

Based on an attribute, you can change the image associated with that attribute, but I can find no way/reference to a way to change the text of the description based on an attribute. Is this already in there and I missed it or has this already been answered in this thread? I have a customer that is rather insistant that I make this possible even though when I took on this customer I explained my lack of knowledge of PHP which Zen Cart is written with. Perforce, I am learning slowly, but, she wants it NOW (isn't that always the way?).

Mal