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: 660,384

Results 3,561 to 3,580 of 3,609
9 May 2024, 7:49 PM
#3561
pegasuspublishing avatar

pegasuspublishing

New Zenner

Join Date:
Dec 2019
Location:
Trenton, TX
Posts:
25
Plugin Contributions:
0

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

mc12345678:

Not built in still based on the idea that not everyone needs our wants attribute stock control. Also I haven't tried it yet, but don't (yet) know of anything preventing its operation.

Reporting of one's own experience would help others/all.

I'm going to guess not compatible with 2.0.0. Uploading files causes entire site to crash with 500 error. Both admin (so install script cannot be run) and storefront.

9 May 2024, 8:02 PM
#3562
pegasuspublishing avatar

pegasuspublishing

New Zenner

Join Date:
Dec 2019
Location:
Trenton, TX
Posts:
25
Plugin Contributions:
0

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

mc12345678:

Not built in still based on the idea that not everyone needs our wants attribute stock control. Also I haven't tried it yet, but don't (yet) know of anything preventing its operation.

Reporting of one's own experience would help others/all.

So I'm guessing not compatible with 2.0.0. Copying files (prior to installation) results in 500 error taking both admin and storefront down.

10 May 2024, 4:13 AM
#3563
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

pegasuspublishing:

So I'm guessing not compatible with 2.0.0. Copying files (prior to installation) results in 500 error taking both admin and storefront down.

Which files were loaded? Have a feeling that not the ones from github where would suggest using the 1.5.8 files etc for the version specific files.

Otherwise please provide error log info while obscuring admin directory information.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

10 May 2024, 10:38 PM
#3564
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:

Which files were loaded? Have a feeling that not the ones from github where would suggest using the 1.5.8 files etc for the version specific files.

Otherwise please provide error log info while obscuring admin directory information.

FYI, I applied the functional changes of the github version for 1.5.8 against a new 2.0.0 system and other than the admin menus generating deprecation messages once per session, had no issue with installation. I didn't attempt full configuration, but that's to follow after incorporating the appropriate admin header calls in the admin screens.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

20 May 2024, 4:20 PM
#3565
chuckrey avatar

chuckrey

Zen Follower

Join Date:
Aug 2020
Location:
Richarson
Posts:
160
Plugin Contributions:
0

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

Hi I am getting closer to launching this plugin on a live site and have been testing on a temporary url. My plan is to cross reference my QB data base w/ the SBA data base each day as products are replenished almost daily and sold daily. In addition to the existing products in the database, there will be new products added to the inventory that were not previously in the database. This requires a manual addition in ZC w/ attributes. I may be missing something and I apologize if I am. Is there a way to add products to the SBA database individually (sometimes there is only 1 brand new product added) without having to shuffle the entire sba database? For some reason, when I process the "Add product attributes that are NOT display-only", it duplicates all the pre-existing data within SBA forcing me to remove the data and re-add. Ideally, I would like to be able to add the one or two products to ZC then add just those products to the SBA data.

I am using 1.5.8a, Responsive template. url is pfcfurnitureindustries.com..... I apologize if this has been addressed, I struggled to find it by search in the thread search option. Thank you so much the plugin in great.

20 May 2024, 11:19 PM
#3566
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

chuckrey:

Hi I am getting closer to launching this plugin on a live site and have been testing on a temporary url. My plan is to cross reference my QB data base w/ the SBA data base each day as products are replenished almost daily and sold daily. In addition to the existing products in the database, there will be new products added to the inventory that were not previously in the database. This requires a manual addition in ZC w/ attributes. I may be missing something and I apologize if I am. Is there a way to add products to the SBA database individually (sometimes there is only 1 brand new product added) without having to shuffle the entire sba database? For some reason, when I process the "Add product attributes that are NOT display-only", it duplicates all the pre-existing data within SBA forcing me to remove the data and re-add. Ideally, I would like to be able to add the one or two products to ZC then add just those products to the SBA data.

I am using 1.5.8a, Responsive template. url is pfcfurnitureindustries.com..... I apologize if this has been addressed, I struggled to find it by search in the thread search option. Thank you so much the plugin in great.

I have no recollection of quite a similar question being asked. Please allow me to try to describe what I understand so that can help identify one or more ways to address the issue(s).

A) Have an "established" store that is using SBA to track product that have attributes.
B) Have a method of adding product to the store.
C) The method to add product to the store occasionally includes product that have attributes.
D) The method of adding product with attributes to the store includes product not previously tracked by SBA.
E) Want to be able to address new product with attributes by making it accessible to SBA for stock control of attribute related product.

So far so good?

Then, a few things come to mind as questions:

  1. Does the addition of product with attributes include product already assigned to SBA and have you worked through the associated stock management? (Either adding the quantity to be addressed or make the available quantity whatever is being imported?)
  2. Do product transition from having attributes to not having attributes? (This is like deleting the attribute(s) from a specific product. I'm not necessarily referring to the addition of product that do not have attributes, though there may be an offshoot from that discussion/answer.)
  3. Does the addition of product with attributes necessarily generate a new attribute off of an existing product already tracked by SBA? (E.g., Large colored shirts now have a newly available color.)
  4. How many user selectable attributes (option names) are to be assigned to a product? (E.g. T-shirt of a given (fixed) size with (selectable) colors [One option name: color] or perhaps T-shirt of multiple (selectable) sizes available in multiple (selectable) colors [two option names: size and color]).

As to the query that was executed in the SBA Configuration area ("Add product attributes that are NOT display-only"). That (and other) queries were written with a specific task in mind and were generally hard coded for consideration against the entire database. BUT... I have heard of others adding their own set of queries or as originally developed/commented by Pottery House, to modify them to perform a desired operation.

I would generally discourage revising the existing functionality and instead add one or more new options to accomplish the task. At least in this way existing functionality would remain as seen necessary to perform and updates would be "easier". If you do go with the addition of one or more new queries, post either here or in github, notifiers could be added into the code to better support such modification and support removing your changes from the plugin's code.

So, yes, though I have not today reviewed the operation of the "Add product attributes that are NOT display-only" selection, it does not surprise me that the result is duplication of existing SBA variants, mostly because the statement doesn't say: "Add new product attributes that are NOT display-only" or "Add product attributes that are NOT display-only AND do NOT exist" or some variation of a similar statement. Basically, what that feature does is go through all product, if the product has attributes and the attributes are not display-only, then that combination is added. Again, as I recall there is no comparison/evaluation against the existing SBA variants.

Further, as to more "user" controlled addition of variants, unfortunately, I haven't created an alternate "external" method I trust to be consistently properly executed. I say that because as more functionality/features are available, database integrity becomes ever more important and dependent on proper configuration of the input file/correlation that can easily be corrupted by user input. Import of incorrectly typed text could cause generation of data across multiple tables, potentially requiring significant rework/revision to correct all of the involved tables (Product options, product options values, product option values to product options, products attributes, SBA variant table to name a few). Basically, there's so many potential problems that I have only approached that operation on a case-by-case basis with each being very unique and specific. The above original question, to me, seems manageable depending on answers to the questions.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

21 May 2024, 2:05 PM
#3567
chuckrey avatar

chuckrey

Zen Follower

Join Date:
Aug 2020
Location:
Richarson
Posts:
160
Plugin Contributions:
0

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

mc12345678:

I have no recollection of quite a similar question being asked. Please allow me to try to describe what I understand so that can help identify one or more ways to address the issue(s).

A) Have an "established" store that is using SBA to track product that have attributes.
B) Have a method of adding product to the store.
C) The method to add product to the store occasionally includes product that have attributes.
D) The method of adding product with attributes to the store includes product not previously tracked by SBA.
E) Want to be able to address new product with attributes by making it accessible to SBA for stock control of attribute related product.

So far so good?

Then, a few things come to mind as questions:

  1. Does the addition of product with attributes include product already assigned to SBA and have you worked through the associated stock management? (Either adding the quantity to be addressed or make the available quantity whatever is being imported?)
  2. Do product transition from having attributes to not having attributes? (This is like deleting the attribute(s) from a specific product. I'm not necessarily referring to the addition of product that do not have attributes, though there may be an offshoot from that discussion/answer.)
  3. Does the addition of product with attributes necessarily generate a new attribute off of an existing product already tracked by SBA? (E.g., Large colored shirts now have a newly available color.)
  4. How many user selectable attributes (option names) are to be assigned to a product? (E.g. T-shirt of a given (fixed) size with (selectable) colors [One option name: color] or perhaps T-shirt of multiple (selectable) sizes available in multiple (selectable) colors [two option names: size and color]).

As to the query that was executed in the SBA Configuration area ("Add product attributes that are NOT display-only"). That (and other) queries were written with a specific task in mind and were generally hard coded for consideration against the entire database. BUT... I have heard of others adding their own set of queries or as originally developed/commented by Pottery House, to modify them to perform a desired operation.

I would generally discourage revising the existing functionality and instead add one or more new options to accomplish the task. At least in this way existing functionality would remain as seen necessary to perform and updates would be "easier". If you do go with the addition of one or more new queries, post either here or in github, notifiers could be added into the code to better support such modification and support removing your changes from the plugin's code.

So, yes, though I have not today reviewed the operation of the "Add product attributes that are NOT display-only" selection, it does not surprise me that the result is duplication of existing SBA variants, mostly because the statement doesn't say: "Add new product attributes that are NOT display-only" or "Add product attributes that are NOT display-only AND do NOT exist" or some variation of a similar statement. Basically, what that feature does is go through all product, if the product has attributes and the attributes are not display-only, then that combination is added. Again, as I recall there is no comparison/evaluation against the existing SBA variants.

Further, as to more "user" controlled addition of variants, unfortunately, I haven't created an alternate "external" method I trust to be consistently properly executed. I say that because as more functionality/features are available, database integrity becomes ever more important and dependent on proper configuration of the input file/correlation that can easily be corrupted by user input. Import of incorrectly typed text could cause generation of data across multiple tables, potentially requiring significant rework/revision to correct all of the involved tables (Product options, product options values, product option values to product options, products attributes, SBA variant table to name a few). Basically, there's so many potential problems that I have only approached that operation on a case-by-case basis with each being very unique and specific. The above original question, to me, seems manageable depending on answers to the questions.

Thanks very much for your response....
With respect to A thru E. I enter all products as attributes specifically to track inventory. I do this because I want to streamline the process of updating inventory daily via EP (SBA Detailed). Any new products added never have SBA previously associated with them as they are a new product with new attributes that did not previously exist on the website. This brings me to the challenge of needing to associate the new product with SBA. Currently I am finding that I need to use the function "Remove all entries from the PAS Table" (to avoid the duplication of SBA entries) then use the "Add product attributes that are NOT display-only" to re-associate all attributes w/ SBA (including the brand new product(s) added). Once re-associated, I then need to reprocess the EP SBA Detailed to re-add the custom ID's and inventory counts. Once that is done, I will then add the custom ID and inventory for the newly added product(s).

I guess what I was looking for or hoping I missed it somewhere was the ability to skip removal of the PAS table function and simply associate the newly added product(s) that include attributes with SBA alone without having to take down all and then rebuild.

I use the display only function for a drop down statement that says "View Options" w/ the drop down function (there are actually customers who don't know to click on the drop down). I also use the display only for a group price as the group price is not tracked as inventory but displays the price if they want to purchase as a group. In my case they are purchasing sofa and loveseat or dining groups. If a customer wants to purchase the sofa only, they can, but most customers want to purchase both sofa and loveseat, therefore the group price is displayed.

I hope this makes sense and thank you so much for your response and attention, I really like the plugin and it's exactly what I need for this website.

22 May 2024, 1:44 AM
#3568
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

chuckrey:

Thanks very much for your response....
With respect to A thru E. I enter all products as attributes specifically to track inventory. I do this because I want to streamline the process of updating inventory daily via EP (SBA Detailed). Any new products added never have SBA previously associated with them as they are a new product with new attributes that did not previously exist on the website. This brings me to the challenge of needing to associate the new product with SBA. Currently I am finding that I need to use the function "Remove all entries from the PAS Table" (to avoid the duplication of SBA entries) then use the "Add product attributes that are NOT display-only" to re-associate all attributes w/ SBA (including the brand new product(s) added). Once re-associated, I then need to reprocess the EP SBA Detailed to re-add the custom ID's and inventory counts. Once that is done, I will then add the custom ID and inventory for the newly added product(s).

I guess what I was looking for or hoping I missed it somewhere was the ability to skip removal of the PAS table function and simply associate the newly added product(s) that include attributes with SBA alone without having to take down all and then rebuild.

I use the display only function for a drop down statement that says "View Options" w/ the drop down function (there are actually customers who don't know to click on the drop down). I also use the display only for a group price as the group price is not tracked as inventory but displays the price if they want to purchase as a group. In my case they are purchasing sofa and loveseat or dining groups. If a customer wants to purchase the sofa only, they can, but most customers want to purchase both sofa and loveseat, therefore the group price is displayed.

I hope this makes sense and thank you so much for your response and attention, I really like the plugin and it's exactly what I need for this website.

Ok, so hopefully this wasn't a waste of time. I specifically asked 5 questions to be able to understand if what I (have/was going) produced would meet your needs. I'm sure it will help someone, but the goal is/was to address your specific issue.

I have created a query that works similar to the existing "Add product attributes that are NOT display-only", except instead of adding "ALL" such product attributes, it only adds those that are not already captured in your database.

WARNING!!!!!!!!! USER BEWARE!!!!!!!

For those that use combinations of attributes (two or more option names for a single product where stock depends on selecting a combination of the option values).....

Tracking both attribute combinations and individual attributes on a given product will generally result in undesirable operations/capabilities... If you really want your store to work that way, please feel free; however, the majority of users will either want attribute combinations on a product or single attribute value selections even if across multiple option names....

You can incorporate this query/code by incorporating the following github commit:
Adds all new product/attribute pairs for single attribute not yet in SBA · mc12345678/Stock_By_Attributes_Combined@f068c27 (github.com)

https://github.com/mc12345678/Stock_By_Attributes_Combined/commit/f068c278593590a136ec4fc5d080d61301e14600

Unfortunately, I didn't yet determine a good notifier to be able to further incorporate similar code, but also see I have some other changes to incorporate but haven't yet...

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

22 May 2024, 1:58 PM
#3569
chuckrey avatar

chuckrey

Zen Follower

Join Date:
Aug 2020
Location:
Richarson
Posts:
160
Plugin Contributions:
0

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

mc12345678:

Ok, so hopefully this wasn't a waste of time. I specifically asked 5 questions to be able to understand if what I (have/was going) produced would meet your needs. I'm sure it will help someone, but the goal is/was to address your specific issue.

I have created a query that works similar to the existing "Add product attributes that are NOT display-only", except instead of adding "ALL" such product attributes, it only adds those that are not already captured in your database.

WARNING!!!!!!!!! USER BEWARE!!!!!!!

For those that use combinations of attributes (two or more option names for a single product where stock depends on selecting a combination of the option values).....

Tracking both attribute combinations and individual attributes on a given product will generally result in undesirable operations/capabilities... If you really want your store to work that way, please feel free; however, the majority of users will either want attribute combinations on a product or single attribute value selections even if across multiple option names....

You can incorporate this query/code by incorporating the following github commit:
Adds all new product/attribute pairs for single attribute not yet in SBA · mc12345678/Stock_By_Attributes_Combined@f068c27 (github.com)

https://github.com/mc12345678/Stock_By_Attributes_Combined/commit/f068c278593590a136ec4fc5d080d61301e14600

Unfortunately, I didn't yet determine a good notifier to be able to further incorporate similar code, but also see I have some other changes to incorporate but haven't yet...

I will give the query/code a run and see how it works out and report it back.

I will address your questions individually as originally asked for the benefit of others..

A) Have an "established" store that is using SBA to track product that have attributes. - There is an existing store that is established on the live url (pfcind.com), however I am using an temporary url (pfcfurnitureindustries.com) to incorporate SBA. Once testing and implementation is complete the migration will move forward.

B) Have a method of adding product to the store. - Yes, my method of adding products to the store is via Easy Populate when I have several. Otherwise, I will use the built in Categories/Products route to add products.

C) The method to add product to the store occasionally includes product that have attributes. - The method I am using will always include attributes even when there is only 1 product. We receive many calls to question inventory and to have the inventory count via the same process of going to the attributes will be less confusing for customers and sales staff.

D) The method of adding product with attributes to the store includes product not previously tracked by SBA. - Yes, every product added will be new and therefore is not yet being tracked via SBA

E) Want to be able to address new product with attributes by making it accessible to SBA for stock control of attribute related product. - Yes, this is the end goal. I want to be able to track every product and every attribute via SBA tracking.

Thank you very much

22 May 2024, 4:23 PM
#3570
chuckrey avatar

chuckrey

Zen Follower

Join Date:
Aug 2020
Location:
Richarson
Posts:
160
Plugin Contributions:
0

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

mc12345678:

Ok, so hopefully this wasn't a waste of time. I specifically asked 5 questions to be able to understand if what I (have/was going) produced would meet your needs. I'm sure it will help someone, but the goal is/was to address your specific issue.

I have created a query that works similar to the existing "Add product attributes that are NOT display-only", except instead of adding "ALL" such product attributes, it only adds those that are not already captured in your database.

WARNING!!!!!!!!! USER BEWARE!!!!!!!

For those that use combinations of attributes (two or more option names for a single product where stock depends on selecting a combination of the option values).....

Tracking both attribute combinations and individual attributes on a given product will generally result in undesirable operations/capabilities... If you really want your store to work that way, please feel free; however, the majority of users will either want attribute combinations on a product or single attribute value selections even if across multiple option names....

You can incorporate this query/code by incorporating the following github commit:
Adds all new product/attribute pairs for single attribute not yet in SBA · mc12345678/Stock_By_Attributes_Combined@f068c27 (github.com)

https://github.com/mc12345678/Stock_By_Attributes_Combined/commit/f068c278593590a136ec4fc5d080d61301e14600

Unfortunately, I didn't yet determine a good notifier to be able to further incorporate similar code, but also see I have some other changes to incorporate but haven't yet...

Update:

I added the query to the install file but ran into a couple of issues. I checked the error log and found the following:

[22-May-2024 10:59:54 UTC] Request URI: /index.php?main_page=product_info&cPath=189_191&products_id=2750, IP address: xxx.xx.xxx.xx, Language id 1
#1 products_with_attributes_stock->updateNotifyAttributesModuleStartOptionsLoop() called at [/home/xxxxxxxx/public_html/includes/classes/traits/NotifierManager.php:87]
#2 base->notify() called at [/home/xxxxxxxx/public_html/includes/modules/attributes.php:148]
#3 require(/home/mypfctim/public_html/includes/modules/attributes.php) called at [/home/xxxxxxxx/public_html/includes/modules/pages/product_info/main_template_vars.php:50]
#4 require(/home/xxxxxxxx/public_html/includes/modules/pages/product_info/main_template_vars.php) called at [/home/xxxxxxxx/public_html/includes/templates/responsive_classic/common/tpl_main_page.php:178]
#5 require(/home/xxxxxxxx/public_html/includes/templates/responsive_classic/common/tpl_main_page.php) called at [/home/xxxxxxxx/public_html/index.php:94]
--> PHP Warning: Use of undefined constant PRODUCTS_OPTIONS_TYPE_SELECT_SBA - assumed 'PRODUCTS_OPTIONS_TYPE_SELECT_SBA' (this will throw an Error in a future version of PHP) in /home/xxxxxxxx/public_html/includes/classes/observers/class.products_with_attributes_stock.php on line 689.

I did receive syntax error warnings at the following lines:
@@ -2723,6 +2823,7 @@ function displayOptionalSQL(){
<option value="runOptionalSQL4" title="Only add the product attributes that are NOT display-only">Add product attributes that are NOT display-only</option>
<option value="runOptionalSQL5" title="Remove the product attributes that are ONLY read-only">Remove product attributes that are ONLY read-only</option>
<option value="runOptionalSQL6" title="Ensure availability and operation of PRODUCTS_OPTIONS_TYPE_SELECT, UPLOAD_PREFIX, and TEXT_PREFIX or if dropdowns do not appear">Restore visibility of Dropdowns</option>
<option value="runOptionalSQL7" title="Add ALL new single attribute NOT display only product to SBA table">Add ALL new product attributes that are NOT display only</option>
<option value="updatePASfieldPAC" title="Update Unique Combo field">Update Unique Combo field</option>
<option value="truncatePAStable" title="WARNING: This will COMPLETLY EMPTY the Product with Attribute Stock Table!">Remove ALL entries from the PAS Table</option>

@@ -2838,6 +2939,11 @@ function displayOptionalSQL(){
verifyProductOptionsTypes();

case 'runOptionalSQL7';

case 'runOptionalAllToSBA';

I also noticed the following has a colon instead of a semi-colon and am not sure if that was intentional
case 'runOptionalAllToSBA':
case 'runOptionalSQL7':

Again, I really appreciate your help and time.

22 May 2024, 6:48 PM
#3571
chuckrey avatar

chuckrey

Zen Follower

Join Date:
Aug 2020
Location:
Richarson
Posts:
160
Plugin Contributions:
0

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

So I found out a way to add attributes to the SBA data by utilizing the "Add Quantity for product variant" If I enter a number in the quantity for all it will add the attributes for me. I had not noticed that link before and after trying a couple of options it worked. I think this will work just fine for my purpose.
@MC12345678. Can you please send me a link where I can buy you a coffee or lunch for your efforts? Thank you..

26 May 2024, 9:49 PM
#3572
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

chuckrey:

Update:

I added the query to the install file but ran into a couple of issues. I checked the error log and found the following:

[22-May-2024 10:59:54 UTC] Request URI: /index.php?main_page=product_info&cPath=189_191&products_id=2750, IP address: xxx.xx.xxx.xx, Language id 1
#1 products_with_attributes_stock->updateNotifyAttributesModuleStartOptionsLoop() called at [/home/xxxxxxxx/public_html/includes/classes/traits/NotifierManager.php:87]
#2 base->notify() called at [/home/xxxxxxxx/public_html/includes/modules/attributes.php:148]
#3 require(/home/mypfctim/public_html/includes/modules/attributes.php) called at [/home/xxxxxxxx/public_html/includes/modules/pages/product_info/main_template_vars.php:50]
#4 require(/home/xxxxxxxx/public_html/includes/modules/pages/product_info/main_template_vars.php) called at [/home/xxxxxxxx/public_html/includes/templates/responsive_classic/common/tpl_main_page.php:178]
#5 require(/home/xxxxxxxx/public_html/includes/templates/responsive_classic/common/tpl_main_page.php) called at [/home/xxxxxxxx/public_html/index.php:94]
--> PHP Warning: Use of undefined constant PRODUCTS_OPTIONS_TYPE_SELECT_SBA - assumed 'PRODUCTS_OPTIONS_TYPE_SELECT_SBA' (this will throw an Error in a future version of PHP) in /home/xxxxxxxx/public_html/includes/classes/observers/class.products_with_attributes_stock.php on line 689.

I did receive syntax error warnings at the following lines:
@@ -2723,6 +2823,7 @@ function displayOptionalSQL(){
<option value="runOptionalSQL4" title="Only add the product attributes that are NOT display-only">Add product attributes that are NOT display-only</option>
<option value="runOptionalSQL5" title="Remove the product attributes that are ONLY read-only">Remove product attributes that are ONLY read-only</option>
<option value="runOptionalSQL6" title="Ensure availability and operation of PRODUCTS_OPTIONS_TYPE_SELECT, UPLOAD_PREFIX, and TEXT_PREFIX or if dropdowns do not appear">Restore visibility of Dropdowns</option>
<option value="runOptionalSQL7" title="Add ALL new single attribute NOT display only product to SBA table">Add ALL new product attributes that are NOT display only</option>
<option value="updatePASfieldPAC" title="Update Unique Combo field">Update Unique Combo field</option>
<option value="truncatePAStable" title="WARNING: This will COMPLETLY EMPTY the Product with Attribute Stock Table!">Remove ALL entries from the PAS Table</option>

@@ -2838,6 +2939,11 @@ function displayOptionalSQL(){
verifyProductOptionsTypes();

case 'runOptionalSQL7';

case 'runOptionalAllToSBA';

I also noticed the following has a colon instead of a semi-colon and am not sure if that was intentional
case 'runOptionalAllToSBA':
case 'runOptionalSQL7':

Again, I really appreciate your help and time.

So, I went back to review the modification I applied. There was an issue with the query I created, it had an extra semi-colon from when I copied and pasted it from within phpMyAdmin.

The issues about the missing constant, well that is something that would be seen with the code in place, visitors navigating the site until the database install was completed. I've made generated a change to the code to prevent logging that issue; however, in a way the fix is unnecessary once the appropriate constant has been set either in a file or the database.

But, the other above issues? I have no idea how the other issues exist in your file. I do not see github history of the problem content like:

  1. I don't see what the issue is with the option list, the three options appear to have the same format with just differences in associated/necessary data. So i'm not sure what issue is/was created there.
  2. semi-colons as a part of case statements, these specifically are supposed to be colons, there is nothing that I found having semi-colons in that spot.

I have created and force pushed an update for the original issue for the query to do what was requested: Adds all new product/attribute pairs for single attribute not yet in SBA · mc12345678/Stock_By_Attributes_Combined@064350f (github.com)

https://github.com/mc12345678/Stock_By_Attributes_Combined/commit/064350fe3a19a5c8d18ac921e4326c26a8192f01

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

30 May 2024, 4:05 PM
#3573
webmanstudios avatar

webmanstudios

New Zenner

Join Date:
Dec 2013
Location:
Adelaide, South Australia
Posts:
29
Plugin Contributions:
0

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

I have just uploaded on a squeaky clean install of V2.0.1 and while there were no error during installation I do get an error when clicking on the All Attribute Stock link.

I am assuming this is the link used access the SBA functions/features.

The link launches a new browser tab as indicated and displays the following error message on the new page "WARNING: An Error occurred, please let us know! If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you entered valid data."

[31-May-2024 01:53:24 ------] Request URI: //index.php?cmd=products_with_attributes_stock, IP address: *******, Language id 1
#0 [internal function]: zen_debug_error_handler()
#1 /
/includes/classes/db/mysql/query_factory.php(714): trigger_error()
#2 /
/includes/classes/db/mysql/query_factory.php(659): queryFactory->show_error()
#3 /
/includes/classes/db/mysql/query_factory.php(299): queryFactory->set_error()
#4 /
/products_with_attributes_stock.php(912): queryFactory->Execute()
#5 /
/index.php(16): require('/******* ..')
--> PHP Fatal error: MySQL error 1146: Table '
.products_with_attributes_stock' doesn't exist :: SELECT DISTINCT pwas.products_id FROM products_with_attributes_stock pwas
LEFT JOIN (SELECT DISTINCT
pa.products_id, pd.products_name
FROM products_attributes pa
LEFT JOIN products_description pd ON (pa.products_id = pd.products_id)
WHERE pd.language_id= 1
ORDER BY pd.products_name) att ON (att.products_id = pwas.products_id)
WHERE
att.products_id IS NULL ==> (as called by) /
/products_with_attributes_stock.php on line 912 <== in //includes/classes/db/mysql/query_factory.php on line 714.

--> PHP Fatal error: MySQL error 1146: Table '*******.products_with_attributes_stock' doesn't exist :: SELECT DISTINCT pwas.products_id FROM products_with_attributes_stock pwas
LEFT JOIN (SELECT DISTINCT
pa.products_id, pd.products_name
FROM products_attributes pa
LEFT JOIN products_description pd ON (pa.products_id = pd.products_id)
WHERE pd.language_id= 1
ORDER BY pd.products_name) att ON (att.products_id = pwas.products_id)
WHERE
att.products_id IS NULL ==> (as called by) */products_with_attributes_stock.php on line 912 <== in //includes/classes/db/mysql/query_factory.php on line 714.

(Directories and original ZC DB tables are correct but have been ****** out.)

30 May 2024, 4:20 PM
#3574
webmanstudios avatar

webmanstudios

New Zenner

Join Date:
Dec 2013
Location:
Adelaide, South Australia
Posts:
29
Plugin Contributions:
0

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

Issue resolved: SBA links and screens were added once I manually ran the SBA install script from the browser address bar. Sorry to be a bother. :)

31 May 2024, 3:46 AM
#3575
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

webmanstudios:

Issue resolved: SBA links and screens were added once I manually ran the SBA install script from the browser address bar. Sorry to be a bother. :)

No problem at all. Would help if I had a central set of instructions to at least get through the start of things. Glad you worked it out though. While the time between posts was only 15 minutes, I hope you didn't lose too much up to that point.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

17 Jun 2024, 4:59 PM
#3576
chuckrey avatar

chuckrey

Zen Follower

Join Date:
Aug 2020
Location:
Richarson
Posts:
160
Plugin Contributions:
0

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

Has anyone had any luck with styling the drop down "Qty" and "Custom Id's"? Been searching w/ no luck. Using 1.5.8 Responsive Classic.

Thanks all.

18 Jun 2024, 9:11 PM
#3577
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

chuckrey:

Has anyone had any luck with styling the drop down "Qty" and "Custom Id's"? Been searching w/ no luck. Using 1.5.8 Responsive Classic.

Thanks all.

Referring to changing the look of the catalog side drop-down for qty, or some sort of admin side modification?

What is the desired modification or issue attempting to address?

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

19 Jun 2024, 2:31 PM
#3578
chuckrey avatar

chuckrey

Zen Follower

Join Date:
Aug 2020
Location:
Richarson
Posts:
160
Plugin Contributions:
0

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

I would like to bold the Qty with the count and/or change it's color to make it stand out a bit more. I am near completion and asked for some input from the users in the office and this was something that came up. You can view it at pfcfurnitureindustries.com If that isn't possible, I was thinking of removing the custom id from displaying so there is less information on that line. Thanks for your response.

23 Jun 2024, 12:33 AM
#3579
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

chuckrey:

I would like to bold the Qty with the count and/or change it's color to make it stand out a bit more. I am near completion and asked for some input from the users in the office and this was something that came up. You can view it at pfcfurnitureindustries.com If that isn't possible, I was thinking of removing the custom id from displaying so there is less information on that line. Thanks for your response.
The dropdown is not a jQuery/javascript driven item. It is a standard option type list which means that there is little to no html modifications possible.

The custom_id was chosen to be attached to that area; however, can be modified/reworked to act/respond/report differently or elsewhere. But, alas, bolding parts, alternate coloring, etc within the dropdown list would require implementing some other dropdown list "tool". I've been wanting to do so, but haven't made the time. I believe it will require a complete rework of the product attributes display code or at least the final output. Currently it is more of a create for the output instead of a create for posing to an html tag. (E.g. not as javascript like as it should be).

Good that the team had some ideas, unfortunately, not easily implemented as requested. I suggest at least capturing the information that is made available, whether it is by alternate javascript output or page location. But basically, by incorporating the data where I did allowed reducing the overall file edits and ways for things to possibly go wrong. :)

Apologize for the delay in response, been busy.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

24 Jun 2024, 1:13 PM
#3580
chuckrey avatar

chuckrey

Zen Follower

Join Date:
Aug 2020
Location:
Richarson
Posts:
160
Plugin Contributions:
0

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

mc12345678:

The dropdown is not a jQuery/javascript driven item. It is a standard option type list which means that there is little to no html modifications possible.

The custom_id was chosen to be attached to that area; however, can be modified/reworked to act/respond/report differently or elsewhere. But, alas, bolding parts, alternate coloring, etc within the dropdown list would require implementing some other dropdown list "tool". I've been wanting to do so, but haven't made the time. I believe it will require a complete rework of the product attributes display code or at least the final output. Currently it is more of a create for the output instead of a create for posing to an html tag. (E.g. not as javascript like as it should be).

Good that the team had some ideas, unfortunately, not easily implemented as requested. I suggest at least capturing the information that is made available, whether it is by alternate javascript output or page location. But basically, by incorporating the data where I did allowed reducing the overall file edits and ways for things to possibly go wrong. :)

Apologize for the delay in response, been busy.

Makes total sense. I understand and I think the way it currently sits will work as needed. Thanks very much for your response.