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

Results 2,641 to 2,660 of 3,609
18 Sep 2016, 6:48 PM
#2641
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

lindsey80:

Hello,

I downloaded this mod and it messed up my admin I just had a blank page. I put all the folders where they should go... I replaced the files with my backup and admin is now fine, My problem is now when I view an item that has an attribute on my site I get the following error WARNING: An Error occurred, please refresh the page and try again. Does anyone know why this is happening?

Thanks
Can only help with your assistance.

Downloaded this module: from where?
Got an error: details of errors are logged by ZC in the directory applicable to one's ZC version, so what ZC version: FAQ to help is: https://www.zen-cart.com/content.php?311-warning-an-error-occurred-please-refresh-the-page-and-try-again
Loading of the files, were the changes of this plugin merged with your existing file(s) or did the files of this plugin just simply replace what was on your server?
How did the install of this to your demo or backup site go? Did it have the same issue(s)?

Again, help us help you, if you could also further address the items of the posting tips, that would be great.

18 Sep 2016, 9:06 PM
#2642
lindsey80 avatar

lindsey80

New Zenner

Join Date:
Apr 2010
Location:
Essex, UK
Posts:
77
Plugin Contributions:
0

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

Hi sorry for the lack of information. I downloaded this from the zen cart addon

I downloaded these files directly over my current files

I don't have a backup/demo??

Log File
`[18-Sep-2016 20:57:15 UTC] PHP Fatal error:
1146:Table '*******_zenc307.zenyj_products_with_attributes_stock' doesn't exist :: SELECT pas.stock_id, pas.quantity
FROM zenyj_products_with_attributes_stock pas
WHERE pas.products_id = '3208'
AND pas.stock_attributes = '4' ==> (as called by) /home//public_html/includes/modules/ashley_pink/attributes.php on line 126 <== in /home/***/public_html/includes/classes/db/mysql/query_factory.php on line 155

Hoping this helps a bit??

Thanks for your patience!!

18 Sep 2016, 9:44 PM
#2643
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

lindsey80:

Hi sorry for the lack of information. I downloaded this from the zen cart addon

I downloaded these files directly over my current files

I don't have a backup/demo??

Log File
`[18-Sep-2016 20:57:15 UTC] PHP Fatal error:
1146:Table '*******_zenc307.zenyj_products_with_attributes_stock' doesn't exist :: SELECT pas.stock_id, pas.quantity
FROM zenyj_products_with_attributes_stock pas
WHERE pas.products_id = '3208'
AND pas.stock_attributes = '4' ==> (as called by) /home//public_html/includes/modules/ashley_pink/attributes.php on line 126 <== in /home/***/public_html/includes/classes/db/mysql/query_factory.php on line 155

Hoping this helps a bit??

Thanks for your patience!!
It does in part. The version made available on the ZC website associated with the most recent upload can be made functional with a more recent ZC version, but really only applies to the version published with it.

Right now the specific problem on your site with a file uploaded as a part of the package is includes/modules/ashley_pink/attributes.php as it is looking for something that has not been installed or has been removed if it did get installed.

As for a test site, it is always suggested that when placing new software that it be tested first on something that won't cause a problem with a live site. As to installing something that is far less likely to cause a problem I am limited on recommendations at this point, again more info needed.

As to the other files that got overwritten, they may need to be replaced with the original version(s), also there are files that may need to be removed that likely did not get removed by your system restore (which probably just restored existing files without removing new ones).

20 Sep 2016, 1:48 AM
#2644
christian_wagner avatar

christian_wagner

New Zenner

Join Date:
May 2013
Location:
Long Branch, NJ
Posts:
49
Plugin Contributions:
0

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

mc12345678:

Well, actually it was a problem identified when trying to further it's use in more recent ZC versions and maintain operability of multiple option names such as you have setup. There are a number of other improvements made since that time as well. Not so sure that the particular issue would have been easy to find in the thread.

If anything, might have suggested reading through these last couple of pages to get an idea of the status of the software and what is going on to keep it accessible to those that wish to use it. :) the images were informative to at least identify my suspicions that it was occurring because of use of the older version(s).

Besides, if don't ask a question, may not ever find an answer. :)

I installed it and it says it installed properly but my front-end is getting a 500 error and the error log says "Class 'products_with_attributes_stock' not found in /home/piratesp/public_html/store/includes/autoload_func.php on line 79"

I saw that someone else is having a similar issue but I can't seem to figure out why this is happening on my end. Any help would be appreciated or if you need to email me separately - christian [at] piratespress.com

Thanks!

20 Sep 2016, 2:16 AM
#2645
christian_wagner avatar

christian_wagner

New Zenner

Join Date:
May 2013
Location:
Long Branch, NJ
Posts:
49
Plugin Contributions:
0

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

UPDATE:

Fixed it!

20 Sep 2016, 4:54 AM
#2646
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

Christian_Wagner:

UPDATE:

Fixed it!

Always helpful to others to explain what was done to fix what issue. :) kind of prevents the: hey I have that "exact" same problem when it's not really true.

20 Sep 2016, 9:48 PM
#2647
christian_wagner avatar

christian_wagner

New Zenner

Join Date:
May 2013
Location:
Long Branch, NJ
Posts:
49
Plugin Contributions:
0

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

mc12345678:

Always helpful to others to explain what was done to fix what issue. :) kind of prevents the: hey I have that "exact" same problem when it's not really true.

Of course! So disclaimer, using ZC 1.5.4. I didn't build or set up the ZC so I'm going off of what the previous person did. So the ADMIN folder had a screwy name and messed me up initially.

My biggest thing was making sure all of the files went where they were supposed to be. It was tough (for me as a non-programmer) to combine the files that were updated for EVERY ZC version vs. the ones that were changed for different versions of ZC. It was meticulous and I had to go back through MANY times to find out that there was a file misplaced or missing.

20 Sep 2016, 10:01 PM
#2648
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

Christian_Wagner:

Of course! So disclaimer, using ZC 1.5.4. I didn't build or set up the ZC so I'm going off of what the previous person did. So the ADMIN folder had a screwy name and messed me up initially.

My biggest thing was making sure all of the files went where they were supposed to be. It was tough (for me as a non-programmer) to combine the files that were updated for EVERY ZC version vs. the ones that were changed for different versions of ZC. It was meticulous and I had to go back through MANY times to find out that there was a file misplaced or missing.

So, there is/was no need to combine the two sets of files before applying them to the site. They actually have been put together so that you could put the "all" files on the server and operation of the site continues like it is not installed or otherwise affecting purchases. Even once all the files are in place, operation of the store continues as if it is not installed (there is a minor exception to that where older stores have slightly corrupted database records which are corrected upon install. I'll have to look closer at that aspect.) anyways, glad that you were able to get it installed and to explain the issues experienced. It certainly should help others that may experience the same issue(s).

21 Sep 2016, 4:54 PM
#2649
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

PHP Fatal error: Call to a member function Execute() on null in /home/austink9/public_html/store/ADMIN/includes/classes/observers/class.products_with_attributes_stock.php on line 205

I'm getting this when trying to delete an Option Name. The name is not in use, so is safe to delete. This is on a Zen Cart 1.5.5a using SBA 1.5.4 from GitHub.

21 Sep 2016, 5:00 PM
#2650
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:

PHP Fatal error: Call to a member function Execute() on null in /home/austink9/public_html/store/ADMIN/includes/classes/observers/class.products_with_attributes_stock.php on line 205

I'm getting this when trying to delete an Option Name. The name is not in use, so is safe to delete. This is on a Zen Cart 1.5.5a using SBA 1.5.4 from GitHub.
Doh, on line 201 add a new line below the commented text and add:

global $db;

Committed to github with correction. Affects all versions of ZC using that code.

https://github.com/mc12345678/Stock_By_Attributes_Combined/commit/01ecbbfcf9f948ccd8ddec98de27d98aec9de505

21 Sep 2016, 5:18 PM
#2652
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

mc12345678:

Doh, on line 201 add a new line below the commented text and add:

global $db;

> 
> Committed to github with correction. Affects all versions of ZC using that code.
> 
> <https://github.com/mc12345678/Stock_By_Attributes_Combined/commit/01ecbbfcf9f948ccd8ddec98de27d98aec9de505>

I can confirm this resolves the error.  Thanks for the quick update!
21 Sep 2016, 5:35 PM
#2653
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:

I can confirm this resolves the error. Thanks for the quick update!

No, thank you for notifying of the issue. Can't fix what isn't known to be broken. :)

30 Oct 2016, 9:53 PM
#2654
deno avatar

deno

New Zenner

Join Date:
Mar 2009
Posts:
76
Plugin Contributions:
0

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

A couple of questions please.

I'm running 1.5.5a on PHP 7.0.12, with this work OK.

Also, say if I have T-shirts in different sizes and a particular size becomes out of stock, will it continue to be available for sale or not?

Thanks

Dene

30 Oct 2016, 11:14 PM
#2655
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

Deno:

A couple of questions please.

I'm running 1.5.5a on PHP 7.0.12, with this work OK.

Also, say if I have T-shirts in different sizes and a particular size becomes out of stock, will it continue to be available for sale or not?

Thanks

Dene

Nothing has denoted that the version available from github won't work on that version of PHP. As for out-of-stock saleability, it is primarily up to how your store is setup as to whether an out-of-stock specific attribute can be "oversold" or not. It has been designed to follow the overall settings of your store such that if your store does not allow selling product that are considered out-of-stock then the plugin will prevent the same at some point in the purchase process.

I have a few things to push to github for further improvements, but as with all plugins, I would suggest installing to a trial location before applying to your live store.

For those wondering about the improvements, well, have modified the stock reporting capabilities so that the listing in the dynamic dropdowns area is expected to only show items that can exist as defined in the admin (ie. Currently out-of-stock options are those that could theoretically exist based on the selections made on the attributes controller. On an upcoming github upload that "stock" display (absence of stock on identified/designated) will be added for dynamic dropdowns when using the default "filter" for multiple product.

Also, some javascript improvements have been made both on the catalog and admin sides. There are/may be some other improvements to be added depending on various factors, but trying to finish cleaning up the javascript before pushing it.

31 Oct 2016, 10:18 PM
#2656
deno avatar

deno

New Zenner

Join Date:
Mar 2009
Posts:
76
Plugin Contributions:
0

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

I'm an idiot. I tried to install this but didn't backup first now I can't get into my admin panel.

Any ideas?

[31-Oct-2016 22:16:12 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function zen_get_ip_address() in /var/www/vhosts/localhost.localdomain/httpdocs/IQ/shop/NOTMYADMIN/includes/init_includes/init_sessions.php:31
Stack trace:
#0 /var/www/vhosts/localhost.localdomain/httpdocs/IQ/shop/includes/autoload_func.php(48): require()
#1 /var/www/vhosts/localhost.localdomain/httpdocs/IQ/shop/NOTMYADMIN/includes/application_top.php(171): require('/var/www/vhosts...')
#2 /var/www/vhosts/localhost.localdomain/httpdocs/IQ/shop/NOTMYADMIN/index.php(10): require('/var/www/vhosts...')
#3 {main}
  thrown in /var/www/vhosts/localhost.localdomain/httpdocs/IQ/shop/NOTMYADMIN/includes/init_includes/init_sessions.php on line 31
31 Oct 2016, 10:45 PM
#2657
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

Deno:

I'm an idiot. I tried to install this but didn't backup first now I can't get into my admin panel.

Any ideas?

[31-Oct-2016 22:16:12 UTC] PHP Fatal error: Uncaught Error: Call to undefined function zen_get_ip_address() in /var/www/vhosts/localhost.localdomain/httpdocs/IQ/shop/NOTMYADMIN/includes/init_includes/init_sessions.php:31
Stack trace:
#0 /var/www/vhosts/localhost.localdomain/httpdocs/IQ/shop/includes/autoload_func.php(48): require()
#1 /var/www/vhosts/localhost.localdomain/httpdocs/IQ/shop/NOTMYADMIN/includes/application_top.php(171): require('/var/www/vhosts...')
#2 /var/www/vhosts/localhost.localdomain/httpdocs/IQ/shop/NOTMYADMIN/index.php(10): require('/var/www/vhosts...')
#3 {main}
thrown in /var/www/vhosts/localhost.localdomain/httpdocs/IQ/shop/NOTMYADMIN/includes/init_includes/init_sessions.php on line 31

Very unusual error messages, but when you say "this" can you please elaborate to ensure we are all referencing the same software.

If had downloaded the version from github, what had been installed or attempted to be installed? Did you get to the point of trying to install version specific files or did you only get the "all versions" files (includes and admin directories) installed?
31 Oct 2016, 10:55 PM
#2658
deno avatar

deno

New Zenner

Join Date:
Mar 2009
Posts:
76
Plugin Contributions:
0

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

https://www.zen-cart.com/downloads.php?do=file&id=202

I downloaded 1.5.3, changed the folder names to match my theme/admin and uploaded. I actually did back up the files that it wanted to overwrite first.

I then went to load stock_by_attr_install.php which is when I got the blank screen. I tried to then go to admin but blank screen. I then copied back the files that I had backed up:

admin/invoice.php
admin/orders.php
admin/packingslip.php
admin/includes/functions/general.php
admin/includes/classes/order.php

includes/classes/order.php
includes/functions/functions_lookups.php
includes/functions/extra_functions/products_with_attributes.php
includes/modules/pages/checkout_shipping/header_php.php
includes/modules/pages/shopping_cart/header_php.php

But still get the blank screen :-/

31 Oct 2016, 11:12 PM
#2659
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

Deno:

https://www.zen-cart.com/downloads.php?do=file&id=202

I downloaded 1.5.3, changed the folder names to match my theme/admin and uploaded. I actually did back up the files that it wanted to overwrite first.

I then went to load stock_by_attr_install.php which is when I got the blank screen. I tried to then go to admin but blank screen. I then copied back the files that I had backed up:

admin/invoice.php
admin/orders.php
admin/packingslip.php
admin/includes/functions/general.php
admin/includes/classes/order.php

includes/classes/order.php
includes/functions/functions_lookups.php
includes/functions/extra_functions/products_with_attributes.php
includes/modules/pages/checkout_shipping/header_php.php
includes/modules/pages/shopping_cart/header_php.php

But still get the blank screen :-/

Oye. Okay. So 1) the version currently offered on this website is for ZC 1.5.1. There's a lot that has changed related to it. If I'm not mistaken some of the additional files that exist in directories like includes/auto_loaders (store or admin) might cause the issue that you are seeing.

Would appear that almost none of the last page or two has been reviewed nor the previous message I posted indicating that would need to download from github to support ZC 1.5.5 (and honestly right now would be the best source for any 1.5.1-1.5.x install as it contains files compatible with all versions (except 1.5.2) and doesn't have the issue reported above.

It hasn't been pushed to the ZC site because of two things: 1) instructions need updating from all the hard work that potteryhouse did and 2) doesn't seem to me to be at the quality level I would like to be able to call it a ZC plugin. There are areas where a store owner could cause oneself trouble because the code doesn't notify them that what they are doing is not right or it doesn't prevent the action. Some of those things I'd rather just make possible instead of strictly prohibiting. I may not directly deal with them, but by staying open minded they can be addressed later.

Anyways, glad you had backups of the files to be overwritten, now need to remove (or overwrite with those from github) the ones that were added new.

31 Oct 2016, 11:13 PM
#2660
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

Another thing. Did the error message change?