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

Results 2,501 to 2,520 of 3,609
27 Apr 2016, 1:15 AM
#2501
ivopivo avatar

ivopivo

New Zenner

Join Date:
Apr 2016
Posts:
18
Plugin Contributions:
0

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

mc12345678:

Would have to look at the commit history to identify changes. What if you applied a customid to eitherone of the purchased product or just any at all? I've made some changes to other aspects like supporting the product attribute grid plugin, but also work on a number of other things and cannot recall specifics

I applied custom Ids for the sold products via phpmyadmin in products_with_stock_attributes and orders_products_attributes_stock with no luck, the same error.

27 Apr 2016, 1:29 AM
#2502
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

This is driving me berzerk... in a few minutes I plan to do a full step by step through the code with explanation to try to see what is going on here. At the front of things, it appears as if none of the products_attributes_id values are being returned by one of the earlier queries that builds what ends up being the products_attributes_comb variable. Does this happen for orders with only one product, multiple product, or does that appear to matter? Also, do you mind indicating what other plugins you have installed that might modify the admin/orders.php file, and another request is if you could show from the above imaged product the stock_attributes field for those variants.

BTW, for your code, if you wish to continue using your system like it is intended, you could comment out lines 797-805 and it would/should move forward, but that doesn't fix what appears to be the overall issue which is what is getting to me. :/

27 Apr 2016, 2:25 AM
#2503
ivopivo avatar

ivopivo

New Zenner

Join Date:
Apr 2016
Posts:
18
Plugin Contributions:
0

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

The commenting out worked. I will run the test you mentioned with multiple products and get a list of the plugins.

27 Apr 2016, 3:06 AM
#2504
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

So the other thing that I was thinking about is if the $db->Execute queries needed to be "reset". If you can/will uncomment that chunk of code again, then in that function (zen_get_customid) where there is something like: $db->Execute($sql); Change the end to: $db->Execute($sql, false, false, 0, true)

But only within the zen_get_customid function.

BTW, what version of PHP is involved?

28 Apr 2016, 1:13 AM
#2505
ivopivo avatar

ivopivo

New Zenner

Join Date:
Apr 2016
Posts:
18
Plugin Contributions:
0

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

Mods installed:

Super Orders
Ultimate Urls
Ty Package Tracker
CSS/JS Loader
Fast and Easy Checkout
Numinix Disk Cache Configuration
Products with Attributes Stock

It happens with multiple products or one product

PHP Version: 5.5.34
MySQL Version: 5.5.48

28 Apr 2016, 2:37 AM
#2506
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

ivopivo:

Mods installed:

Super Orders
Ultimate Urls
Ty Package Tracker
CSS/JS Loader
Fast and Easy Checkout
Numinix Disk Cache Configuration
Products with Attributes Stock

It happens with multiple products or one product

PHP Version: 5.5.34
MySQL Version: 5.5.48

So, I did add some additional code to the branch I started to try to address this, but probably doesn't help the situation yet. Could you please refresh me, if a product was "purchased", it has a customid, and display customid is active, does orders work or does it error out? (ie error out no matter what the condition of the customid on any product?)

I have some additional "tests" that I can do to ditch out of the code if one or another conditions exist... ie. if no customid is assigned to the product, then don't go try to search for one of any type of combination.

7 May 2016, 5:47 PM
#2507
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

ivopivo,

If you are willing/able I am almost complete with a revision to the zen_get_customid function that should prevent the error that you came across. I went back and used a process similar to how attributes are built/verified to be present. My guess is that something in the "scope" of MySQL servers "causes" this issue to appear, but that it can be relatively easily rectified with some care. I'll provide the direct link shortly, but it is one of the branches on github related to customids. Considering that I can not reproduce the problem, your assistance would be helpful upon completion of the change(s).

14 May 2016, 8:16 PM
#2508
sungmo avatar

sungmo

New Zenner

Join Date:
Jan 2010
Posts:
79
Plugin Contributions:
0

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

Hi all

Stock By Attribute (SBA) Stock Page Version 1.5.3

I have a question about search.

I can use "search" function without error on Stock By Attribute (SBA) Stock Page Version 1.5.3 because i am a superuser

So i made a another user and i gave him a permition to access Stock By Attribute (SBA) Stock Page Version 1.5.3.

The user can use most function but "search".

When he use "search", a error message appears.

The error message is bellow.

"Sorry, your security clearance does not allow you to access this resource.

Please contact your site administrator if you believe this to be incorrect.

Sorry for any inconvenience."

How can i give the user a permition to use "search" function on Stock By Attribute?

Thanks guys.

15 May 2016, 6:55 AM
#2509
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

sungmo:

Hi all

Stock By Attribute (SBA) Stock Page Version 1.5.3

I have a question about search.

I can use "search" function without error on Stock By Attribute (SBA) Stock Page Version 1.5.3 because i am a superuser

So i made a another user and i gave him a permition to access Stock By Attribute (SBA) Stock Page Version 1.5.3.

The user can use most function but "search".

When he use "search", a error message appears.

The error message is bellow.

"Sorry, your security clearance does not allow you to access this resource.

Please contact your site administrator if you believe this to be incorrect.

Sorry for any inconvenience."

How can i give the user a permition to use "search" function on Stock By Attribute?

Thanks guys.

Is that the only option to which they were given access? Just the Stock By Attributes "switch" or was another option authorized?

15 May 2016, 6:07 PM
#2510
mikeyg avatar

mikeyg

Totally Zenned

Join Date:
May 2005
Posts:
515
Plugin Contributions:
0

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

I am getting an error in my logs about the following table TABLE_ORDERS_PRODUCTS_ATTRIBUTES_STOCK which should be orders_products_attributes_stock in the database. It does not seem to have been created. But I do not see the code in the sql install file to generate it. Have a missed something. Should it be created manually or by the install process. What are the fields. I think this is causing a problem with order lines missing from my orders and orders not being accepted back from paypal.

15 May 2016, 10:09 PM
#2511
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

MikeyG:

I am getting an error in my logs about the following table TABLE_ORDERS_PRODUCTS_ATTRIBUTES_STOCK which should be orders_products_attributes_stock in the database. It does not seem to have been created. But I do not see the code in the sql install file to generate it. Have a missed something. Should it be created manually or by the install process. What are the fields. I think this is causing a problem with order lines missing from my orders and orders not being accepted back from paypal.
It looks like you have a partial install. includes/extra_datafiles/products_with_attributes_stock_database_tables.php
And admin/includes/extra_datafiles/products_with_attributes_stock_database_tables.php

Both have the define for that table. The admin/stock_by_attr_install.php will install it when the full/upgrade install is performed.

15 May 2016, 10:29 PM
#2512
mikeyg avatar

mikeyg

Totally Zenned

Join Date:
May 2005
Posts:
515
Plugin Contributions:
0

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

Thank you for the reply. Both those files are there in my install but what I have noticed is that the create table code for that table is not in the admin/stock_by_attr_install.php

So that table has not been created in my database. Just trying to work out now what the fields for that table should be and if i can create it manually using phpmyadmin. I am now getting an error saying that there is a duplicate entry when it tries to enter the data so I still do not have something correct and the orders are not completing.

I have just been through this thread again and can see there is reference to a github development page for this module. I have looked at the page but not sure which version I should install as I have zc 1.5.4 and not sure if the new admin/stock_by_attr_install.php is only for zc 1.5.5a and what else might be missing or changed that could effect my site.

Any advice welcome.

MG

15 May 2016, 10:38 PM
#2513
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

MikeyG:

Thank you for the reply. Both those files are there in my install but what I have noticed is that the create table code for that table is not in the admin/stock_by_attr_install.php

So that table has not been created in my database. Just trying to work out now what the fields for that table should be and if i can create it manually using phpmyadmin. I am now getting an error saying that there is a duplicate entry when it tries to enter the data so I still do not have something correct and the orders are not completing.

I have just been through this thread again and can see there is reference to a github development page for this module. I have looked at the page but not sure which version I should install as I have zc 1.5.4 and not sure if the new admin/stock_by_attr_install.php is only for zc 1.5.5a and what else might be missing or changed that could effect my site.

Any advice welcome.

MG

The fileset(s) have been written so that the base includes and admin directories apply to all versions of ZC supported by the code. Then the ZC version folder is "applied". Nothing about ZC 1.5.5.a was "needed" for the plugin to work. Additionally, thus far no file changed in ZC 1.5.5.a have been identified as needing to be changed in the SBA fileset.

The install file that you have/are using is an old one if it does not have that table in it. There are other features that have been added to the code that will cause problems also if the code continues to be mixed...

15 May 2016, 10:47 PM
#2514
mikeyg avatar

mikeyg

Totally Zenned

Join Date:
May 2005
Posts:
515
Plugin Contributions:
0

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

Thank you. I might just go through a full merger/reinstall check on my local server and see if that solves the issue using these latest files. I have got super orders installed but I am wondering if I have done this correctly and if I need to look very carefully at the orders.php files as I merge these two.

16 May 2016, 12:26 AM
#2515
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

MikeyG:

Thank you. I might just go through a full merger/reinstall check on my local server and see if that solves the issue using these latest files. I have got super orders installed but I am wondering if I have done this correctly and if I need to look very carefully at the orders.php files as I merge these two.

The primary feature added to admin/orders.php by this software is the display of customid in the code. Everything else has been pretty much moved to the observer class. Everything that has been edited in the ZC 1.5.3/1.5.4 version of this file except for that has been incorporated into ZC 1.5.5+. The display of the customid could also be moved out of the file, but that would be at the "cost" of the original products_model of the product info page. Currently SBA preserves that information throughout and displays the customid separately which has required the display in some way to be integrated to admin/orders.php.

25 May 2016, 6:08 AM
#2516
sungmo avatar

sungmo

New Zenner

Join Date:
Jan 2010
Posts:
79
Plugin Contributions:
0

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

Zen 1.5.1

I am using superuser.

and I set up another user who is admin, even if I check every box and give him permissions to access everything, he cannot use search function in Stock By Attribute (SBA) Stock Page Version 1.5.3.

you can see the below image.

Attachment 16352

when I search a word, he get the "Sorry, your security clearance does not allow you to access this resource. Please contact your site administrator if you believe this to be incorrect. Sorry for any inconvenience." message.

you can see below picture..

Attachment 16353

can someone give me a solution?

thanks.

25 May 2016, 8:06 AM
#2517
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

sungmo:

Zen 1.5.1

I am using superuser.

and I set up another user who is admin, even if I check every box and give him permissions to access everything, he cannot use search function in Stock By Attribute (SBA) Stock Page Version 1.5.3.

you can see the below image.

Attachment 16352

when I search a word, he get the "Sorry, your security clearance does not allow you to access this resource. Please contact your site administrator if you believe this to be incorrect. Sorry for any inconvenience." message.

you can see below picture..

Attachment 16353

can someone give me a solution?

thanks.

The last time that someone posted this issue, I setup an account that had minimal permissions and was unable to reproduce the problem at least when using the software that is available from https://github.com/mc12345678/Stock_By_Attributes_Combined.
It would seem to me that if the problem persisted that one or more files would need to be added to the admin page setup to support authorizing the file(s) for use.

Like said though I was unable to reproduce the problem using the software from the above location. The version subfolders are related to your ZC version and are recommended to be installed/merged after the base includes and admin directories are installed/merged.

30 May 2016, 8:52 PM
#2518
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, a few things have been updated in the files for SBA to further it's operation/use.

  1. SBA now supports upload files as an attribute.
  2. If Products Attributes Grid is being used (as recently updated) and upload of files is an attribute, there are two options with regards to the file(s) associated with the multiple product generated. Either one file is created on successful upload for each upload file and that file applies to all product generated from each of the grid products, or a copy of that file can be made such that each product has an associated image (permits the store owner to further modify each image independently). This option is currently controlled by the $renumber variable in includes/extra_cart_actions/stock_by_attributes.php. Set to true (current default), and the image associated with the specific upload file attribute for every product generated through Product Grid attributes will be provided a unique file (duplicate content of the original) and associated information for the uploaded file. Set to false and a single instance of the uploaded file (again one file for each upload file option) will exist and all grid product will use/reference the one image.
  3. A few admin logging actions have been added that were not previously included associated with installation.
  4. A change was incorporated that corrected an issue with attribute comments when using Dynamic Dropdowns.

There's still other improvements to be made; however, the overall functionality of SBA has come a long way thanks to the work of potteryhouse, jeking, and those before them.

30 May 2016, 11:51 PM
#2519
jsmoke222000 avatar

jsmoke222000

New Zenner

Join Date:
May 2016
Location:
LA
Posts:
17
Plugin Contributions:
0

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

Zen Cart v1.5.5

Fresh install via ftp

Additional Addons installed - Dynamic price updater, sales report, ship station

I just installed the SBA 1.5.5 beta on my site. The issue that I am having is that when the quantity for a specific variant is set to 0, the attributes in the dropdown menu on my product page do not show Out Of Stock. If the quantity for a specific variant is set to 0 it will not allow a customer to order that variant, so this part is working properly.

See the pic below:

Any help with this issue would be greatly appreciated. Thanks in advance!

31 May 2016, 12:38 AM
#2520
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

Can you provide the settings under Configuration>Stock?