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,321 to 2,340 of 3,609
4 Oct 2015, 4:09 AM
#2321
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

Dragon718:

Thank you very much for your support after removing everything I uploaded. I uploaded the newest version everything working fine.

Welcome, glad it woked out. I had even set up a new site with ths plugn, just to verify functionalty. While it worked I did find a few more places to add some checks for full installation in the event it takes a while to install the sql portion of the plugin ao as not to interfere with visitor's shoppng while installing. I'll be updating the code soon. I've also iidentified all of the files that are shared with ZC and those that are newly added. Have to figure out how best to present that whether a new version, all as one version or keep them separate as they are now...

8 Oct 2015, 2:32 PM
#2322
maxpayne381 avatar

maxpayne381

New Zenner

Join Date:
Aug 2015
Location:
London
Posts:
4
Plugin Contributions:
0

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

Im having problem to install the Stock by Attribute v 1.5.3 When I run the run the install get this error:

PHP Catchable fatal error: Object of class queryFactoryResult could not be converted to string in admin/stock_by_attr_install.php on line 125

I cannot find the fix anywhere. Could you please help? I have ZenCart 1.5.3 and PHP 5.5

Thank in advance

8 Oct 2015, 3:04 PM
#2323
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

maxpayne381:

Im having problem to install the Stock by Attribute v 1.5.3 When I run the run the install get this error:

PHP Catchable fatal error: Object of class queryFactoryResult could not be converted to string in admin/stock_by_attr_install.php on line 125

I cannot find the fix anywhere. Could you please help? I have ZenCart 1.5.3 and PHP 5.5

Thank in advance

Should be trying to install Stock By Attribute v1.5.4 on a ZC 1.5.3 version...

8 Oct 2015, 4:26 PM
#2326
maxpayne381 avatar

maxpayne381

New Zenner

Join Date:
Aug 2015
Location:
London
Posts:
4
Plugin Contributions:
0

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

Experience an issue in SBA 1.5.4 version as well. It works fine with one attribute but Im using 2 (color - read only, size - dropdown).

As soon as the color is set for product the size is not showing / working. Same for the color this attribute is not shown on product info page at all.

Im wondering if its the settings issue or something in the code. Please help, thank you.

8 Oct 2015, 5:17 PM
#2327
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

maxpayne381:

Experience an issue in SBA 1.5.4 version as well. It works fine with one attribute but Im using 2 (color - read only, size - dropdown).

As soon as the color is set for product the size is not showing / working. Same for the color this attribute is not shown on product info page at all.

Im wondering if its the settings issue or something in the code. Please help, thank you.

My guess is that there are html validation issues with the template. Javascript is used and in this area if there are validation issues then the javascript (subsequent set of values) do not work... Or stock may not be entered correctly ie out of stock but other notifications are turned off... Although I can't help deeply at the moment with review of the source code, but there are online tools that can identify discrepancies.

What's the website?

Ohhh, and read-only isn't yet captured... What's the reason for having a read-only attribute of color instead of a selectable color?

9 Oct 2015, 12:04 AM
#2328
maxpayne381 avatar

maxpayne381

New Zenner

Join Date:
Aug 2015
Location:
London
Posts:
4
Plugin Contributions:
0

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

Thanks for your reply. The read only attributes work fine until I add SBA then it disappear. I want to have read only as our products have only one color each. The attribute should be there so it can be working with dynamic filters on listing page.

The aim is to have attribute which doesnt have to be selected but can be picked by dynamic filter. Any ideas how to do this?
We can have color in selection box but would be better if its selected... now it says First Select Color.

One more issue I have is to show Out of stock... If I select show quantities the Out of Stock works fine = is not able to select but I can see the quantities per other attributes which is not good. If I turn this off then I cannot see the stock but Out of Stock is there and able to select and put into shopping bag. Is there any fix or setting for this or do I need to find and change in the code?

9 Oct 2015, 12:35 AM
#2329
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

maxpayne381:

Thanks for your reply. The read only attributes work fine until I add SBA then it disappear. I want to have read only as our products have only one color each. The attribute should be there so it can be working with dynamic filters on listing page.

The aim is to have attribute which doesnt have to be selected but can be picked by dynamic filter. Any ideas how to do this?
We can have color in selection box but would be better if its selected... now it says First Select Color.

One more issue I have is to show Out of stock... If I select show quantities the Out of Stock works fine = is not able to select but I can see the quantities per other attributes which is not good. If I turn this off then I cannot see the stock but Out of Stock is there and able to select and put into shopping bag. Is there any fix or setting for this or do I need to find and change in the code?

So let me try to explain how all this fits together... Stock quantities for a multiple attribute combination can not be shown without using something like javascript at least if a change in one selection has an effect on the other(s)... It is possible to show each/all attributes without using the dynamic dropdown option(s); however, then the attribute quantity will not be shown if the item is considered to have multiple attributes... The dynamic dropdown code has not yet been written to properly incorporate read only attributes.. At this time it expects one to "select" the read only attribute which isn't selectable. The other thing not discussed here is how are the variants entered... There are a number of variables to the setup including the discussion of the above in regards to out-of-stock, quantities displayed, etc... It is some of this complexity that I see is one reason it has not yet been incorporated into ZC as a base feature...

So, then there is the issue of the read-only attribute... Have you tried swapping the sort order of them for one? Also there is a setting at least in ZC 1.5.4 associated with how read-only attributes are treated when adding to the cart, haven't tried it yet, but supposedly it would treat the read-only attribute as a hard item against the stock check... Another thought is that if there is only one color to be "chosen" then make it a dropdown attribute by itself (meaning could make it default, and have no other option value in the list. It will/would force selection when using dynamic dropdowns and sure be an "extra" step, but it would be work under the current arrangement of the plugin.

There is a goal and work being done to incorporate read-only attributes to be used in any/all ways that seem to be applicable; however, this is being supported on an as able basis at this time with other projects having a priority based on commitment...

You might be able to make changes to the includes/templates/YOUR_TEMPLATE/templates/tpl_modules_attributes.php file, or includes/modules/YOUR_TEMPLATE/attributes.php or one of the dynamic dropdown class files in includes/classes with the filename format of pad__dropdown.php or radioset...

6 Nov 2015, 3:59 AM
#2330
jsarwar avatar

jsarwar

Zen Follower

Join Date:
Jul 2012
Posts:
347
Plugin Contributions:
0

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

Since installed SBA other option types not working e.g. checkbox, drop down etc.
When click on "add to cart" item add to cart but shopping cart page shows error "WARNING: An Error occurred, please refresh the page and try again."

Error log shows

[05-Nov-2015 22:51:59 America/New_York] PHP Warning:  mysqli_query(): Empty query in /home/---/public_html/includes/classes/db/mysql/query_factory.php on line 43
[05-Nov-2015 22:51:59 America/New_York] PHP Fatal error:  0: ::  ==> (as called by) /home/---/public_html/includes/functions/extra_functions/products_with_attributes.php on line 155 <== in /home/---/public_html/includes/classes/db/mysql/query_factory.php on line 155

any idea how to use checkbox as some product have only 1 attribute (optional addition) for customers and want to display with checkbox so they can select it per their choice.

6 Nov 2015, 1:23 PM
#2331
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

jsarwar:

Since installed SBA other option types not working e.g. checkbox, drop down etc.
When click on "add to cart" item add to cart but shopping cart page shows error "WARNING: An Error occurred, please refresh the page and try again."

What version of Zen Cart and which SBA?

6 Nov 2015, 3:19 PM
#2332
jsarwar avatar

jsarwar

Zen Follower

Join Date:
Jul 2012
Posts:
347
Plugin Contributions:
0

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

1.5.3 ZC

Stock By Attribute (SBA) Version 1.5.4

7 Dec 2015, 8:28 PM
#2333
buildingblocks avatar

buildingblocks

Totally Zenned

Join Date:
Jun 2008
Posts:
629
Plugin Contributions:
0

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

Hi

Using zen cart 1.5.4 with SBA 1.5.4 master, I'm trying to figure out where a problem I am having is occurring. A list of other installed modules is listed below. It seems like the problem is with SBA but I'm not certain if it's that or with Fast and easy checkout, What is happening is when a product with attributes (SBA) is added to shopping cart (main_page=shopping_cart) I click the checkout button and can get to the checkout page (main_page=checkout&fecaction=null) to confirm payment.

However, if a product without attributes (not using SBA) is added to shopping cart, when I click on the checkout button the page stays on the shopping cart page, can't continue on to main_page=checkout&fecaction=null.

If I turn off fast and easy checkout then when adding a product without attributes (not using SBA) I can move from main_page=shopping_cart through to standard checkout process beginning with main_page=checkout_shipping

There are no error logs being generated.

Is it known if SBA 1.5.4 master is fully compatible with fast and easy checkout?

Any thoughts on a possible cause?

tableau template

fast and easy checkout

database mysql backup

stock by attributes

ceon uri mapper

Google Merchant Center Feeder
rss feed

Sitemap XML

Sales report

ckeditor

ezpage metas

google analytics

thanks

7 Dec 2015, 8:35 PM
#2334
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

buildingblocks:

Hi

Using zen cart 1.5.4 with SBA 1.5.4 master, I'm trying to figure out where a problem I am having is occurring. A list of other installed modules is listed below. It seems like the problem is with SBA but I'm not certain if it's that or with Fast and easy checkout, What is happening is when a product with attributes (SBA) is added to shopping cart (main_page=shopping_cart) I click the checkout button and can get to the checkout page (main_page=checkout&fecaction=null) to confirm payment.

However, if a product without attributes (not using SBA) is added to shopping cart, when I click on the checkout button the page stays on the shopping cart page, can't continue on to main_page=checkout&fecaction=null.

If I turn off fast and easy checkout then when adding a product without attributes (not using SBA) I can move from main_page=shopping_cart through to standard checkout process beginning with main_page=checkout_shipping

There are no error logs being generated.

Is it known if SBA 1.5.4 master is fully compatible with fast and easy checkout?

Any thoughts on a possible cause?

tableau template

fast and easy checkout

database mysql backup

stock by attributes

ceon uri mapper

Google Merchant Center Feeder
rss feed

Sitemap XML

Sales report

ckeditor

ezpage metas

google analytics

thanks

It's a recently discovered "compatibility" issue between FEC and SBA. FEC passes an empty text string as the attributes value instead of not passing anything. SBA was written with the thought that a non-passed piece of information/undeclared variable would be null...

If you take a look at the slightly more updated version found. At: https://github.com/mc12345678/Stock_by_Attributes_Combined, the code has been updated to address that issue as well as correction needed to better handle product with attributes not tracked by stock...

7 Dec 2015, 9:11 PM
#2335
buildingblocks avatar

buildingblocks

Totally Zenned

Join Date:
Jun 2008
Posts:
629
Plugin Contributions:
0

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

awesome! thanks for replying so quickly! Does the whole install need to be updated or just the functions_lookups.php?

7 Dec 2015, 9:31 PM
#2336
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

buildingblocks:

awesome! thanks for replying so quickly! Does the whole install need to be updated or just the functions_lookups.php?

Safest answer is to replace files. Haven't made database changes in a while. If the download was relatively recent and has the majority of functions affecting core like data in an override class, then the functions_lookup.php should be sufficient to address the stopped at shopping_cart problem. There were a number of other improvements recently. In particular is some "error" checking that is beneficial if product has multiple attributes and dynamic dropdowns is not enabled, then a product tracked by SBA where a combination has been selected doesn't exist notifies the customer...

Just sayin' :)

7 Dec 2015, 9:45 PM
#2337
buildingblocks avatar

buildingblocks

Totally Zenned

Join Date:
Jun 2008
Posts:
629
Plugin Contributions:
0

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

alrighty....let me go check on the date my files were uploaded. Thanks :)

7 Dec 2015, 11:09 PM
#2338
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

buildingblocks:

alrighty....let me go check on the date my files were uploaded. Thanks :)

Assuming that the files were uploaded on the same day that they were downloaded from the applicable github site, this should be a fine comparison; however, that time comparison may not be the right date/time to use... The download date/time would be the more appropriate to use...

8 Dec 2015, 1:30 PM
#2339
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

jsarwar:

1.5.3 ZC

Stock By Attribute (SBA) Version 1.5.4

Sorry for the seriously delayed response to this. Perhaps you have already resolved it, but that error occurring on that line was from the version that was posted September 9, 2014 and remained as written (potentially problematic) until May 24, 2015. Updating the installed version will resolve that issue and provide additional capabilities as well as other improvements that have been made.

17 Dec 2015, 9:49 PM
#2340
badarac avatar

badarac

Totally Zenned

Join Date:
Aug 2009
Location:
Longs, SC
Posts:
635
Plugin Contributions:
0

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

Just on the off chance that someone has run into this. In reading this support thread it seems that the version that should be installed with Zencar 1.5.4 is SBA 1.5.4 from github. I downloaded and installed this on a site upgraded from 1.3.9 which had SBA installed on it. I merged and copied all the files, upgraded the DB, and did some testing. A couple issues were discovered.
All products without attributes trigger a low stock email when ordered. Products that have attributes are fine and only trigger an email when the quantity actually drops below the reorder level. When the email is sent the following error is received.

PHP Warning:  Invalid argument supplied for foreach() in includes/classes/observers/class.products_with_attributes_stock.php on line 331

The email that is sent looks like this

Low Stock Report:
ID# 922, model# 201964, customid , name Bracelet, Stock: 

In an effort to see if it was a conflict with something else installed, I installed a fresh copy of 1.5.4 to a new database, importethe products, and re-installed the SA code. In a fresh install it did the same thing. I then saw that there was a combined merged version so I installed that. I received the same errors.
The other issue is that if I order more than the stock available for a particular attribute I see the not enough stock message. The available stock does not appear in the cart though.
Anything?