-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Quote:
Originally Posted by
Malaperth
Now I believe I know why the conversation is now here...
Anyway, with all the fixes and merges that have been done on Github, an old man like me gets confused... or maybe I'm just dense (my wife added that)... But, where can I get the absolute latest functional version for 1.5.1 please?
Mal
https://github.com/potteryhouse/stoc...tribute_1.5.3/
is the version that supports ZC 1.5.1
All the files have been brought to a single branch with a branch stub available to test/publish other changes before incorporating into the master branch.
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Quote:
Originally Posted by
tronage
Sent you a PM with links to my site. The original item (with 2 attributes) works as expected, but now a new item I made with only 1 attribute is now displaying "out of stock" next to all the attributes in the dropdown. If I add a 2nd attribute to that very item then the "out of stock" messages go away. Is this a "bug" or is there somewhere else to turn off out of stock messages on single attribute items?
Understand, so yes there is a difference in how single and multiple attributes are handled. Currently single attributes are handled through 1) the setting in Dynamic Dropdowns configuration as to whether to be active for single, multiple or all attributes. The Dynamic Dropdown code provided in the SBA module does not fully work with the current JavaScript and the previous sequenced dropdown code has been updated/modified to function and provide options that are similar to what was created by potteryhouse/jeking for single attributes. There remains a few things to be incorporated and wrinkles to iron out.
So, when addressing issues with this, like before, details are needed to understand the setup and identify the potential issues first before a deep code review.
It was my understanding (as I have tried to minimize touching the results of what potteryhouse and jeking were expecting, that the display of out-of-stock for single attribute dropdowns was optional and controlled in the configuration menu. I will say, that if the expectation is that no product is to display out-of-stock, then the text could be removed from the define keeping the constant on the left, and have the single quotes on the right be empty. That's a cheat way and doesn't fix the central problem, but would work in the interim until the source of the issue is found.
Unfortunately and as somewhat pointed out by malaperth, there have been a number of changes, merges, pushes, etc... that it may be difficult to determine the difference(s) that may be present possibly contributing to this. Sorry for also being a bit of a pain, but could you identify the SBA version and ZC version associated to try to validate the issue, and on what date SBA was downloaded? (Thinking that may be the best way to determine if the issue has since been resolved by other updates.)
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Quote:
Originally Posted by
mc12345678
Sorry for also being a bit of a pain, but could you identify the SBA version and ZC version associated to try to validate the issue, and on what date SBA was downloaded? (Thinking that may be the best way to determine if the issue has since been resolved by other updates.)
No pain at all and I'm very appreciative of the time and effort that you have taken to respond. It is quite refreshing! I'm using the SBA 1.5.4-master that I downloaded on 6/1/15. from the link I posted in my previous post. And I'm currently running Zen 1.5.4 And prior to installing I checked the overwrite files, and none of them needed a merge (in other words the handful of add-ons I've installed did not make any changes to the overwrite files in the SBA package).
I also figured out "something" that may either help in tracking it down, or it at least fixes my functionality... previously to get rid of the pop-up issue I set "Enable Dynamic Dropdowns" to off, and that killed the popup from popping (yay), so based on what you said about the different handling I figured maybe turning on the dynamic for single attributes would do "something", so setting this to "On for single attribute only". Now my multi-attributes still don't pop and don't show out of stock (yay) and my single attribute also does not display out of stock (double yay).
So I'm not sure if that is a work around, or a help in finding a bug, or a working as intended, but (at least for now) it seems to function as I would like it to.
Thanks!
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Quote:
Originally Posted by
tronage
No pain at all and I'm very appreciative of the time and effort that you have taken to respond. It is quite refreshing! I'm using the SBA 1.5.4-master that I downloaded on 6/1/15. from the link I posted in my previous post. And I'm currently running Zen 1.5.4 And prior to installing I checked the overwrite files, and none of them needed a merge (in other words the handful of add-ons I've installed did not make any changes to the overwrite files in the SBA package).
I also figured out "something" that may either help in tracking it down, or it at least fixes my functionality... previously to get rid of the pop-up issue I set "Enable Dynamic Dropdowns" to off, and that killed the popup from popping (yay), so based on what you said about the different handling I figured maybe turning on the dynamic for single attributes would do "something", so setting this to "On for single attribute only". Now my multi-attributes still don't pop and don't show out of stock (yay) and my single attribute also does not display out of stock (double yay).
So I'm not sure if that is a work around, or a help in finding a bug, or a working as intended, but (at least for now) it seems to function as I would like it to.
Thanks!
So, if it is worth anything, I need to verify the version uploaded to the version I just tested, but I also don't recall changing anything about Dynamic Dropdowns recently, but with the following settings I was able to continue using Dynamic Dropdowns and control the notification of the out-of-stock statement. (Mind you, out-of-stock could be changed to something like on-back order, or other terminology.)
|
|
Enable Dynamic Dropdowns |
2 |
|
Product Info Single Attribute Display Plugin |
multiple_dropdowns |
|
Show Out of Stock Attributes |
True |
|
Product Info Multiple Attribute Display Plugin |
sba_sequenced_dropdowns |
|
Mark Out of Stock Attributes |
Right |
|
Display Out of Stock Message Line |
False |
|
Prevent Adding Out of Stock to Cart |
True |
|
SBA Number of Records to Displayed |
25 |
The first setting identifies that DD is to only apply on multiple attribute products.
The Show Out of Stock attributes part allows display of attributes that would be well considered out-of-stock.
The Mark Out of Stock Attributes adds the text that is normally Out Of Stock to the left, right, or not at all in the drop down window.
The Display Out of Stock Message Line couples the javascript popup and the text that appears after acknowledging the out-of-stock popup so that if set to True, then will get the popup, if set to false, then will not.
The "Prevent Adding Out of Stock to Cart" option appears to only control notification that a product is out-of-stock upon trying to add the product to the cart; however, does not yet prevent/cancel adding the product to the cart.
Just some testing that was performed to investigate this as well as another issue....
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Going off of what you are saying, I did some experimenting. I turned the dynamic dropdowns to 1 (so it is on for both single and multi). Here is how I have my dynamic Drop downs set:
Enable Dynamic Dropdowns 1
Product Info Single Attribute Display Plugin single_dropdown
Show Out of Stock Attributes True
Product Info Multiple Attribute Display Plugin sba_sequenced_dropdowns
Mark Out of Stock Attributes None
Display Out of Stock Message Line False
Prevent Adding Out of Stock to Cart False
SBA Number of Records to Displayed 25
For my experiment, I only made changes to "Product Info Multiple Attribute Display Plugin". Here are the results for a product with 2 attributes (color and size):
single_radioset - works as expected
single_dropdown - works as expected (What I'll probably start using since I like dynamic and this one currently works)
multiple_dropdowns - Broken - displays the first attribute for BOTH dropdowns (ex: Color: and then below that Color: again when the 2nd should be Size)
sequenced_dropdowns - Broken - Color and Size dropdowns are "empty" clicking them just shows "First Select Color" with no options, and "next select size" with no options. (Even though I do have "Show Out of Stock Attributes" set to True)
sba_sequenced_dropdowns - Broken - Even through I have "display out of stock message line" set to false (which you said should stop the javascript pop up) I STILL get the pop-up message when I make a selection, and after I dismiss the pop-up text appears below the dropdowns with a similar out of stock message.
With dynamic turned OFF multi-attribute - works as expected, and no out of stock messages. Single-attribute starts showing a rogue out of stock line...
So I wanted to compare what the out of stock message looks like when it SHOULD show (Dynamic on, mark on right) to the message that shouldn't show (with dynamic off) Something interesting I found:
With Dynamic drop downs on, and "mark out of stock Attributes" set to "right" on my single attribute items I get:
"Red - Out of stock"
BUT if I set dynamic drop downs to 0 (off) and not change anything else I get:
"Red Out of Stock"
The difference is the lack of a "-" and a capitol "S" in stock. This might help aid it tracking things down since the two phrases being displayed are different I'm thinking... I'm no programmer, but I can help search:
from the source download, I'm seeing the lowercase "s" version here:
\includes\languages\dutch\extra_definitions\dynamic_dropdowns_sba.php(2): define('TEXT_OUT_OF_STOCK', 'Out of stock');
\includes\languages\english\extra_definitions\dynamic_dropdowns_sba.php(2): define('TEXT_OUT_OF_STOCK', 'Out of stock');
\includes\languages\french\extra_definitions\dynamic_dropdowns_sba.php(2): define('TEXT_OUT_OF_STOCK', 'Out of stock');
And I'm seeing the upper case "S" version here:
\admin\stock_by_attr_install.php(673): ('Show Out of Stock Attributes', 'PRODINFO_ATTRIBUTE_SHOW_OUT_OF_STOCK', 'True', 'Controls the display of out of stock attributes.', :configuration_id:, 10, now(), NULL, 'zen_cfg_select_option(array(\'True\', \'False\'),'),
\admin\stock_by_attr_install.php(674): ('Mark Out of Stock Attributes', 'PRODINFO_ATTRIBUTE_MARK_OUT_OF_STOCK', 'Right', 'Controls how out of stock attributes are marked as out of stock.', :configuration_id:, 30, now(), NULL, 'zen_cfg_select_option(array(\'None\', \'Right\', \'Left\'),'),
\admin\stock_by_attr_install.php(675): ('Display Out of Stock Message Line', 'PRODINFO_ATTRIBUTE_OUT_OF_STOCK_MSGLINE', 'True', 'Controls the display of a message line indicating an out of stock attributes is selected.', :configuration_id:, 40, now(), NULL, 'zen_cfg_select_option(array(\'True\', \'False\'),'),
\admin\stock_by_attr_install.php(676): ('Prevent Adding Out of Stock to Cart', 'PRODINFO_ATTRIBUTE_NO_ADD_OUT_OF_STOCK', 'True', 'Prevents adding an out of stock attribute combination to the cart.', :configuration_id:, 50, now(), NULL, 'zen_cfg_select_option(array(\'True\', \'False\'),'),
\includes\classes\pad_sba_sequenced_dropdowns.php(253): $out.=" alert('All selections of the attributes below this one are Out of Stock. Please select a different option.');\n";
\includes\languages\dutch\extra_definitions\products_with_attributes.php(13): define('PWA_OUT_OF_STOCK', ' Out of Stock: ');
\includes\languages\english\extra_definitions\products_with_attributes.php(13): define('PWA_OUT_OF_STOCK', ' Out of Stock: ');
\includes\languages\french\extra_definitions\products_with_attributes.php(13): define('PWA_OUT_OF_STOCK', ' Out of Stock: ');
Again I'm not a programmer, but if I ended up wanting to change the text to maybe "Special order item" or something like that I would just change the define text in one of the files above (I guess the dynamic php if I'm using dynamic and pwa php if I'm not?)?
Let me know if any of this helps.
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Looked over the recent discussion on the topic and didn't see the following addressed. (If I missed it, my apologies) how are the multiple attribute combinations generated? Are they a series of single attributes with one attribute each with a quantity or as a combination of attributes with a quantity associated with each combination?
What other plugins are installed as with a fresh install of ZC and SBA, those issues have yet to be encountered. FYI, the other types of DD display have not been modified from the version available for download from the plugins section. This allows users to continue with whatever rewritten version(s) they may have as developed by others.
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
The other question related to this is what type of dropdown is used? Using the default ZC dropdown or the SBA dropdown?
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Quote:
Originally Posted by
mc12345678
The other question related to this is what type of dropdown is used? Using the default ZC dropdown or the SBA dropdown?
The dropdown type I'm using for the options are SBA Select List (dropdown) basic
As I said earlier I only have a handful of addons, none of which I think would be relevant (they are usps, ups and paypal). And prior to install none of the overwrites had any thing to be merged. As for your last question, I'm not sure I follow, but I will tell you my process of adding an item:
1) create the item
2) assign the attributes using the attribute controller
3) use the products with attributes stock (aka SBA) to find the item I created,
4) click the "add quantity for product variant"
5) then if there is just a few, I'll pick the drop down combination, enter my custom id and quantiy. If there is a bunch, I'll hit the all attributes combo option, setting quantity to zero. Then on the page that spits out, I'll go in and just add the custom id's to the fields. The item I've used for testing was entered via manualy selecting the dropdowns and entering the custom id and quantity.
-
2 Attachment(s)
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Quote:
Originally Posted by
tronage
The dropdown type I'm using for the options are SBA Select List (dropdown) basic
As I said earlier I only have a handful of addons, none of which I think would be relevant (they are usps, ups and paypal). And prior to install none of the overwrites had any thing to be merged. As for your last question, I'm not sure I follow, but I will tell you my process of adding an item:
1) create the item
2) assign the attributes using the attribute controller
3) use the products with attributes stock (aka SBA) to find the item I created,
4) click the "add quantity for product variant"
5) then if there is just a few, I'll pick the drop down combination, enter my custom id and quantiy. If there is a bunch, I'll hit the all attributes combo option, setting quantity to zero. Then on the page that spits out, I'll go in and just add the custom id's to the fields. The item I've used for testing was entered via manualy selecting the dropdowns and entering the custom id and quantity.
So I haven't attempted to duplicate the scenario specifically to see if this is the case, but below should be two images showing the two different scenarios to which I speak. They are created by different means on the front end in the admin. The first is as described many attributes each with their own stock. The second is many attributes combined as individual variant "products" each combination of attributes having a single quantity of availability.
Attachment 15337
Attachment 15338
Then with regards to:
Quote:
Originally Posted by
tronage
5) then if there is just a few, I'll pick the drop down combination, enter my custom id and quantiy. If there is a bunch, I'll hit the all attributes combo option, setting quantity to zero. Then on the page that spits out, I'll go in and just add the custom id's to the fields. The item I've used for testing was entered via manualy selecting the dropdowns and entering the custom id and quantity.
Could you elaborate on just a few what?
Just a few option names such as color, size, brand? or just a few option values under each option name? Such as perhaps two colors, two sizes, 1 brand, then would manually select each of the four combinations possible?
Asking for a couple of reasons, one is to identify the current system response by the choice of options (and associated changes necessary) and to figure out why with no plugins that directly affect this one why the results are so significantly different. I'll double check the files that are uploaded as compared to those that are satisfactorily working otherwise both locally and by others thus far...
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
I forgot I'm also using WinchesterBlack template... don't know if that counts as an "add-on" since I wouldn't think it messes with function, more just layout and color. And, I think I kinda get it (I apologize). I've been using the terms single and multi to reference how many attributes. So when I've been saying single, I am referring to the single-multi you show (one item, that has just one attribute, populated by say color, so item widgets, comes in red, green, and blue. zero stock in each. This is the scenario that when I turn off the dynamic, shows the odd out of stock message.
When I have been saying multi, I'm referring to multi-attributes, so this would be like your combo-multi, meaning widgets come in red, green, blue, and small, med, large. Therefore there is a matrix formed for 9 options, each with their own id and stock. These are the ones that seem to all be "broken" in some way when using any type of dynamic other then the single drop or the radio button (the first 2 options). the rest all have quirks as I described in my previous message.
To answer your question regarding "by just a few", I mean, lets say I have widgets in red green and blue. So in the "products with attributes stock (aka SMB)" page I would find my item, click add quantity for product, and then being there is only 1 drop down, with 3 options (total 3 variants) I would select a atribute, fill in the id and quantity and hit submit for each. But now if I had a 2nd item Widgets with Colors red, orange, yellow, green, blue, and purple. And sizes xs, s, m, l, XL, 2XL, that would yield 36 combinations, so rather then doing each one individually (since I already know the stock for all is zero) I would pick "all-attributes-combo" for both color and size, leave description and id blank, and fill in quantity as zero, and hit submit. I would then be presented with a matrix of all 36 possible options, to which I would just click on the ID spot for each one and fill in the IDs for them.
Now I can tell you regardless if an item had one attribute or two (I don't think I have any items with three), all items I entered when I originally posted were all entered by manually selecting from the drop-downs for each item or item combo. It wasn't until maybe yesterday I figured out my way to speed up the process by using the all-attributes-combo, and I have to say since I know all my stock is currently zero, I've been lazy and using it on pretty much all my items (even if it is just one attribute with two choices). I find it much easier to fill in item ids into a matrix (reminds me of using excel), then manually doing each on a form and clicking submit.
I hope that at least gives you the information you need. And I hope I answered your questions sufficiently.
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Okay, so maybe I get it now also. But first, a minor correction to the above statement so that readers are not 100% confused. :P The first example showed a product with multiple attributes (option names) each listed individually, but is still a multi-attribute product. This aspect of identifying a product was only recently realized but was a "feature" that seemed like potteryhouse/jeking intended. As a result of this recent discovery, there are some aspects of the code that need rework to accomodate appropriately.
Now the part that I get:
All product identified with 0 quantity, where multiple attributes are added as a combination with the expectation that out-of-stock is turned off are still showing one such combination with the condition of displaying the undesired out-of-stock aspect.
I do think I remember seeing the logic to possibly cause that response and at the time I didn't see the need to address it. How short sited I was... Will add this to the list of "fixes".
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
I believe I found the solution for the popup message appearing when using sba_sequenced_dropdown even though the goal was to not have it appear when the stock was 0 and using DD.
I'll post the changes necessary in a little while, but it was "unfinished" coding that resulted in the message persisting even though other options are turned off.
The fix is to be applied to: includes/classes/pad_sba_sequenced_dropdowns.php
And another menu option to be added to the Dynamic Dropdowns configuration menu to control the popup. This will offer the store owner to modify the activation of the popup with whatever content is desired. I will need to see what code is not incorporated that is causing the line below to display as the version I am using doesn't do that
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
So, mc12345678, the link you posted in post #2201 should still be the correct link once you get the above fixes in?
Mal.
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Quote:
Originally Posted by
Malaperth
So, mc12345678, the link you posted in post #2201 should still be the correct link once you get the above fixes in?
Mal.
For users of ZC 1.5.1, yes the link in https://www.zen-cart.com/showthread....15#post1283615 would be correct. For users of ZC 1.5.3 and ZC 1.5.4 would go to https://github.com/potteryhouse/stoc...ttribute_1.5.4
The more recent one tends to be updated first to potentially support the largest audience. I have to add in a script to remove all readonly attributes without deleting every record before I upload the patch to the display issue when using sba_sequenced_dropdowns with multiple attributes. Hopefully tomorrow will have everything in place.
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Quote:
Originally Posted by
mc12345678
For users of ZC 1.5.1, yes the link in
https://www.zen-cart.com/showthread....15#post1283615 would be correct. For users of ZC 1.5.3 and ZC 1.5.4 would go to
https://github.com/potteryhouse/stoc...ttribute_1.5.4
The more recent one tends to be updated first to potentially support the largest audience. I have to add in a script to remove all readonly attributes without deleting every record before I upload the patch to the display issue when using sba_sequenced_dropdowns with multiple attributes. Hopefully tomorrow will have everything in place.
Makes sense to me. :) I will wait until you have udpdated the 1.5.1 compatible version before downloading again since, at least in appearance, that multiple attribute issue is one I am having also. I've waited this long even while noone was actively working on the plugin, what's another day, or week, or month for that matter? ;) Thank you again for your efforts on our behalf!
Mal.
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
For users that have previously installed SBA that included the install of Dynamic Dropdowns, the "upgrade" using the files currently available as described above can be performed by replacing the files and then running the following query in the admin->tools->Install SQL Patches window. If run from phpMyAdmin, will need to ensure to include the table prefix for the tables in question.
Code:
SELECT @configuration_id := configuration_group_id FROM configuration_group WHERE configuration_group_title='Dynamic Drop Downs' LIMIT 1;
INSERT INTO `configuration` (configuration_title, configuration_key, configuration_value,
configuration_description, configuration_group_id, sort_order,
date_added, use_function, set_function) VALUES
('Display Javascript Popup for Out-of-Stock Selection',
'PRODINFO_ATTRIBUTE_POPUP_OUT_OF_STOCK', 'True',
'Controls whether to display or not the message for when a products attribute is out-of-stock.',
@configuration_id, 45, now(), NULL, 'zen_cfg_select_option(array(\'True\', \'False\'),');
Installation as a new product, will perform/incorporate the above, so there would be no need to perform it for a new install and if run on a new install would cause an error (Didn't rewrite the insert to ignore an error) also, if 'Dynamic Drop Downs' is not found, the @configuration_id will be a 0 value and will not appear in the Dynamic Drop Downs configuration menu option but would appear when looking at the configuration menu for the 0 id. Absence of the above when the updated files are in place will result in the javascript popup appearing as if the javascript popup had been enabled/set to True.
The updated files also include an option in the admin to remove Read-Only attributes that have been added to combinations/single products. If the Read-Only option is the only thing that is tracked in SBA for a product, then the variant will be removed (levels are not synced automatically).
Also updated some of the terminology used in the admin's configuration window. Previous reference to Read-Only attributes was actually reference to Display Only attributes (as set in the attributes controller). Options set as Display Only when adding product will be added (currently) if the combo option is selected as part of the addition.
That code is to be modified to allow refined control; however, currently display only attributes will be added to selectable attributes when using the combo option.
-
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5
Awesome, I will install this update this evening and see how things goes. In the meantime, I have another issue.
I've now started getting orders, and I'm not sure if I'm just not looking in the right place.
Senario:
Item created in zen cart. Has the default item# abc
and has two attribues attached (size-sm and lg and color-black and white)
In SBA I've created a list of all 4 combinations and assigned them each a unique "custom ID" abc-sm-w, abc-sm-b, abc-lg-w and abc-lg-b
And as usual my stock is all set to zero.
Now on the website the user sees the single-line dropdown (since right now I'm using the dynamic dropdown for multiple attribute is set to single dropdown)
It also lists all 4 possible combinations properly.
However no matter which is chosen, in the shopping cart it just shows item # abc (the "default one") and doesn't display the ids that I defined within SBA.
When I view the invoice and packing slip both within zen cart, none of my multiple attribute items have the little "sub-text" line with the SBA id. So I have no idea what options the user selected.
The single attribute SBA items are working beautifully.
Real life example from the invoice of an order in zen cart:
a single attribute item spits out:
Code:
1 x EDGE Hydra Dry Snorkel
- Color: Black / Black ( Item # EDG0364-BB ) EDG0364
while a multiple attribute item spits out:
Code:
1 x Edge Transcend Fins EDG0023
The multiple attribute item has size and color options with all possible combinations defined with unique IDs within the SBA module. The single attribute it displays the "-BB" item number defined within SBA (and looks perfect!), but on a multiple attribute item doesn't display anything.
PLEASE HELP since I've now made my store live, and I'm going nuts contacting customers to clarify their orders on anything containing multiple attribute items.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Be sure that in the stock configuration area that you have
SBA Display Custom ID set to true.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
mc12345678
Be sure that in the stock configuration area that you have
SBA Display Custom ID set to true.
On second thought, just tried the method above: Multiple_attributes set to single dropdown and obtained the same result as described.
The single Dropdown option(s) of Dynamic Dropdowns have not been modified to support this method of product addition. Currently the only Dynamic Dropdown method that has been modified to support this version of SBA is sba_sequenced_dropdown for multiple attributes. Single attributes are covered/addressed by using the built in code (not Dynamic Dropdowns).
So:
Dynamic Dropdowns -> Enable Dynamic Dropdowns set to 2 (or 0 which results the quantities not being available nor should the popups occur or other selectable options)
Dynamic Dropdowns -> Product Info Multiple Attribute Display Plugin set to sba_sequenced_dropdown
The other options remain available to support coding performed by other programmers to simply copy the applicable file for the chosen method.
Even the readme of the Dynamic Dropdown plugin indicates that for multiple attributes to use the sequenced dropdown and for single attributes to use the multiple_dropdowns. The others may now look right or work as designed; however, no additional code changes have been made either in the SBA code nor the Dynamic Dropdown code to support the other options (yet).
For further information, the use of the single dropdown for multiple attributes results in page data that doesn't match other "normal"/expected data. It will be interesting to get it to work, but it is currently not incorporated into this set of code.
Suggest incorporating the code from the download, adding the menu option using the SQL identified above and changing the settings to the above as well...
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
I'm going to try to take a look at what it takes to accomodate that option, but one thing I see as a possible issue is the "reliability" of returning to the applicable selection(s) when clicking on the item in the cart. That is based on the options/values selected and at the moment I forget where that is generated in the process of adding an item to the cart because the value data will have to be deconstructed to relate it back to one of the SBA database options.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
mc12345678
I'm going to try to take a look at what it takes to accomodate that option...
Well remember I was only using single line because sba sequenced was giving me that popup issue, so I switched to what "worked"... ideally I'd like the sequenced dropdowns you suggest. I'm going to install your update tonight. To be sure, I should download the 1.5.4-master version you linked, upload that to my site, and then run the script you posted within zen cart to accomplish the upgrade correct? If it does tame the pop-up then I'll be back on the sba sequenced dropdowns.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
tronage
Well remember I was only using single line because sba sequenced was giving me that popup issue, so I switched to what "worked"... ideally I'd like the sequenced dropdowns you suggest. I'm going to install your update tonight. To be sure, I should download the 1.5.4-master version you linked, upload that to my site, and then run the script you posted within zen cart to accomplish the upgrade correct? If it does tame the pop-up then I'll be back on the sba sequenced dropdowns.
This time, I believe every condition was tested to a minimum that seemed more than sufficient, though I'm sure there are/could be some weird variation of quantities not tested... Anyways, used zero stock and modified the various switch settings to each combination. Actually may have something that will support Read Only attributes soon, but have a few other things to work out on this and other items.
Anyways yes, since this version of SBA has already been installed, the only database modification is the addition of the new Dynamic Dropdowns switch. Otherwise, there were a few files updated to address the new/corrected feature.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Wow,
ok it is sooooooo close I can taste it....
Everything now is almost working great, switched to the SBA sequenced dropdown, and suppressed the js popup (love having that menu option there now!).
On my multiple attribute items, the first drop down works fine. But the 2nd in the series only shows 1 option (the first value as per the sort order for that attribute). For example:
And item has Color: Black / White and Size: Small (with a sort order 10 in the option values manager) / Large (with a sort order of 20 in the option values manager).
When you view the item, The first drop gives both choices black or white. no matter which color I pick, the 2nd drop will only say small. (and I have all set to zero inventory, and show out of stock attributes to true, and all of the option types are set to SBA Select List (Dropdown) Basic). This happens for all my multiple attribute items.
As a sidenote, aside from only listing the 1st value of the 2nd attribute in the sequence, when I add to cart, it does now show the correct SBA ID, etc. so I'm very supper excited for that!!!
Any ideas? If it aids in tracking it down, when I turn off dynamic dropdowns, all works perfect on the multiple attribute items: the 2nd drop has all the options, it adds to cart, and it puts the sba id there, etc.
And I'm sure I've not said it enough, but I am TOTALY grateful for your patients helping me to get this up and running!
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
I have found that to happen if there are formatting issues with the page, like an extra { or } or </td><tr> or other html tags that end up affecting the layout of the output.
Suggest using html validation to review the page and see what it may find. :)
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Sent you a pm with a link, let me know if any of that is useful...
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
tronage
Sent you a pm with a link, let me know if any of that is useful...
It was and yes there are validation errors that are affecting the display of the dropdowns, primarily unbalanced </div> tags. Haven't had an opportunity to dig into the specific page code, but one thing that seemed to jump out (and reltively easy to fix) was the sequence of tags that follow display of a few of the images where the </a> tag is applied "too early".
While not caused by this plugin, the following would be a process that could be used to sort this out.
1) Have the page validated by an html validator.
2) Based on the line number and column number, view the source of the web page being validated and locate the content.
3) From there identify the area of the code that produces the content displayed to correct the identified issue.
4) Recommend reperforming the above steps until the error(s) are resolved. Warnings would be good to address as well, but are less significant issues.
Ideally before applying plugins that include javascript or for that matter change the display of information the pge should be validated so that such issues can be identified, corrected, and the cause of not displaying can be determined.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
is there any way to disable or hide the 'Qty: ' which appears in attribute drop downs when the latest version of stock by attributes is installed (zencart 1.5.3)?
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
mattys
is there any way to disable or hide the 'Qty: ' which appears in attribute drop downs when the latest version of stock by attributes is installed (zencart 1.5.3)?
See the settings in the stock section of the configuration menu.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
mc12345678
It was and yes there are validation errors that are affecting the display of the dropdowns, primarily unbalanced </div> tags. Haven't had an opportunity to dig into the specific page code, but one thing that seemed to jump out (and reltively easy to fix) was the sequence of tags that follow display of a few of the images where the </a> tag is applied "too early".
While not caused by this plugin, the following would be a process that could be used to sort this out.
1) Have the page validated by an html validator.
2) Based on the line number and column number, view the source of the web page being validated and locate the content.
3) From there identify the area of the code that produces the content displayed to correct the identified issue.
4) Recommend reperforming the above steps until the error(s) are resolved. Warnings would be good to address as well, but are less significant issues.
Ideally before applying plugins that include javascript or for that matter change the display of information the pge should be validated so that such issues can be identified, corrected, and the cause of not displaying can be determined.
I appreciate all your help getting everything to the state it is in. Unfortunately the method you describe (while I understand the process) would be beyond the scope of my knowledge. A "faster" way was I knew the handful of addons I have installed couldn't be to blame (UPS, USPS, PayPal, CKeditor, and SBA). So I figured it must be the template. Changed to the "Classic Contemporary Green" and the drops worked.
I know nothing about php or css or js... So making my own fix for this unique situation (SBA+Winchester_black) to get the two to play nice is beyond me, nor do I expect the template author to figure out my problem since it is quite a specialized situation (probably unique to me). So for now I'll just turn the dynamic off, while maybe I seek out a different responsive template that has that all black "glam" feel to it. Or maybe there will be a new version of Winchester_black that she releases that may fix the issue in the future.
Again thanks for all your help and I'm very pleased to have this addon, and can't imagine trying to run zen-cart without it... I have no idea how other shop owners actually manage stock, and such when you have anything with attributes in your store, this makes things so much easier once setup. And if you ever do figure anything semi-specific that I could relay to the template author that would make both play nice, let me know. That would be awesome.
You got a donate setup anywhere? I'd like to at least buy ya a beer/coffee :cheers:! You have been most helpful!
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
If you provide Anne with enough information about the situation, I'm sure she would be happy to help identify where the issue is. Even if not her, someone onthat forum probably has already resolved it. One thing to sort of close the loop is to see if the same errors appear with the DD off as when it is on. Afterall, just wanting the template to validate. :)
Glad to know though that otherwise it works and without the input about the issue, wouldn't have fixed it otherwise. Thank you for finding that.
Oh, and as a side note, signatures below one's post tend to contain related website information. :)
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
FWIW, I've updated the code to support the single dropdown option being used across single and multiple attribute options including keeping the customid. I may have found on SBA 1.5.3 for ZC 1.5.1 that in the sba_sequenced_dropdowns that there might have been an extra displayed } in the javascript. I've removed it from the uploaded file so it may resolve an issues seen previously, it may cause it. :) Let me know if this caused an issue. May need to run through the install again on a clean system to see any negative effects.
Also, almost have a general use of READONLY attributes incorporated for say sequenced dropdowns so that their info will still be displayed and in the sequence desired, just not interfering with the remaining operation. :) I say almost, though there is still a bit of work to do and some general testing.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quick Question:
I'm still trying to resolve the issue with the Winchester_Black template and the 2nd attribute only showing one value. In an effort to fix it, I'm comparing a fresh download of the template with my server files. And I've found two files:
Includes/templates/winchester_black/templates/
tpl_modules_main_product_image.php
tpl_shopping_cart_default.php
That are VERY different (not so much different as more each has parts the other doesn't). Since I've uploaded SBA after winchester_black, if there was an overwrite it would be the SBA file.
So my question is the above files right now I'm using the SBA versions? And maybe I need to be using the Winchester_black? or merge the two? Let me know your thoughts.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
tronage
Quick Question:
I'm still trying to resolve the issue with the Winchester_Black template and the 2nd attribute only showing one value. In an effort to fix it, I'm comparing a fresh download of the template with my server files. And I've found two files:
Includes/templates/winchester_black/templates/
tpl_modules_main_product_image.php
tpl_shopping_cart_default.php
That are VERY different (not so much different as more each has parts the other doesn't). Since I've uploaded SBA after winchester_black, if there was an overwrite it would be the SBA file.
So my question is the above files right now I'm using the SBA versions? And maybe I need to be using the Winchester_black? or merge the two? Let me know your thoughts.
If the files in the plugin and the template are the same then you need to merge them.
Thanks,
Anne
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
UPDATE:
Anne has been a huge help, however her most recent post points back to SBA being issue with my 2nd attribute only showing one value:
https://www.zen-cart.com/showthread....71#post1284771
If you go back one page in her thread, she posted a link to a "working" version (and I tested and verified it worked) But when she changed her settings to how I have mine, and set the stock to zero it broke it. And when using the default template (as the link currently shows here: http://weblyweb.com/sba/index.php?ma...roducts_id=180) it is broke in identically the same way as I'm experiencing. And she said this was a fresh install of everything.
As a "test" I did not change what options I had set for dynamic dropdowns. I picked an item with two attributes, and added stock to all the combinations. sync'ed the quantities, and reloaded the live site. Issue still remained. So I'm guessing it has to be something with the options that I've got set under dynamic dropdowns? Currently set as:
Code:
Enable Dynamic Dropdowns 1
Product Info Single Attribute Display Plugin multiple_dropdowns
Show Out of Stock Attributes True
Product Info Multiple Attribute Display Plugin sba_sequenced_dropdowns
Mark Out of Stock Attributes None
Display Out of Stock Message Line False
Display Javascript Popup for Out-of-Stock Selection False
Prevent Adding Out of Stock to Cart False
SBA Number of Records to Displayed 25
I'm still using the previous "fix" version... I've not installed the "latest update" you mention above regarding the single dropdown, readonly, etc.
Any ideas?
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
picaflor-azul
If the files in the plugin and the template are the same then you need to merge them.
Thanks,
Anne
They are each modified from a vanilla install and therefore the changes made by/for each should be evident. Usually such changes/differences are easily integrated and do not fight with each other so should be rather straight forward.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
picaflor-azul
If the files in the plugin and the template are the same then you need to merge them.
Thanks,
Anne
AH you rock Anne! And I'm sure when I flipped to the default template it did not break... I didn't "install" it into the default template. I just turned on the default under tools-template selection... so it was a "false positive". So when properly installed it always breaks with my settings. maybe somewhere in these files the issue lays?
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
tronage
UPDATE:
Anne has been a huge help, however her most recent post points back to SBA being issue with my 2nd attribute only showing one value:
https://www.zen-cart.com/showthread....71#post1284771
If you go back one page in her thread, she posted a link to a "working" version (and I tested and verified it worked) But when she changed her settings to how I have mine, and set the stock to zero it broke it. And when using the default template (as the link currently shows here:
http://weblyweb.com/sba/index.php?ma...roducts_id=180) it is broke in identically the same way as I'm experiencing. And she said this was a fresh install of everything.
As a "test" I did not change what options I had set for dynamic dropdowns. I picked an item with two attributes, and added stock to all the combinations. sync'ed the quantities, and reloaded the live site. Issue still remained. So I'm guessing it has to be something with the options that I've got set under dynamic dropdowns? Currently set as:
Code:
Enable Dynamic Dropdowns 1
Product Info Single Attribute Display Plugin multiple_dropdowns
Show Out of Stock Attributes True
Product Info Multiple Attribute Display Plugin sba_sequenced_dropdowns
Mark Out of Stock Attributes None
Display Out of Stock Message Line False
Display Javascript Popup for Out-of-Stock Selection False
Prevent Adding Out of Stock to Cart False
SBA Number of Records to Displayed 25
I'm still using the previous "fix" version... I've not installed the "latest update" you mention above regarding the single dropdown, readonly, etc.
Any ideas?
I think the version previously loaded has an extra curly bracket in the javascript display of the sba_sequenced_dropdown.php class file. That extra curly bracket was supposed to be commented out in the earlier version (not an issue in SBA 1.5.4) but in comparing the two versions did not get corrected before.
Short of it, fixed in the above download link. This is also why requested to test the various conditions to identify the "cause" it was the DD file for sba_sequenced_dropdowns that I loaded for SBA 1.5.3 to support ZC 1.5.1.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Found it.
In the condition provided, the function stkmsg is removed from the page; however, calls to that function were not removed... Updated a new copy of the includes/classes/pad_sba_sequenced_dropdowns.php file.
At line: 247 add:
Code:
if ($this->out_of_stock_msgline == 'True') {
Then at new line 249 add:
Then at new line 262 add:
Code:
if ($this->out_of_stock_msgline == 'True') {
and again now at new line 264 add:
This will remove the error that is caused by trying to call a non-existent function that is between each pair of new code.
so 247 through 249 will look something like:
Code:
if ($this->out_of_stock_msgline == 'True') {
$out.=" stkmsg(frm);\n";
}
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
As usual, Anne certainly has gone above and beyond to provide support.
While the above code changes will solve the immediate issue, on the surface I don't consider it an ideal solution. My basis for that statement is the extra PHP necessary to prevent the javascript error that appeared and the need to "remember" that anywhere the stkmsg call is made instead of one time within the javascript section itself. That is further to consider that the less javascript presented to a guest, the shorter the load and operation time. So, it may actually be a faster/better solution, but seems like a near mess on the code side.
Basically have code that is writing code is a way to think about it. (PHP writing javascript.) Would be nice to keep it simple enough to allow others to update/modify/etc., but complex enough to give the necessary/desired result(s).
Just expressing some thoughts and thankful for the testing/reporting.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Salvation at last!
All seems to be working now. Just need to turn on some side boxes that Anne had me turn off, but I don't see them interfering. Your changers worked, at least for now if/when a better solution is created as you mention. Thanks so much!!!!!
Also a quick question: the drop downs for the sequenced drops are appearing in a box with a white background, and the template is primarily a black background. Could you point me in the right direction to which file or area I should be looking at to change this background to black and the text to white?
Thanks!
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Well, nother recent "discovery" between what dalia has pointed out and some further code inspection, the tags around the dropdowns need to be modified and that should "help". Otherwise would suggest deling with the .css to modify the appearance.
I'll see if I can suggest something based on the information previously provided.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Ok, I'm using an older version of SBA 1.53 and some of the "Out of Stock" messages are grey and some of them are black. I can't for the life of me find anywhere it sets a color for the text in a dropdown. Do you know where it is, mc12345678?
Mal
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
Malaperth
Ok, I'm using an older version of SBA 1.53 and some of the "Out of Stock" messages are grey and some of them are black. I can't for the life of me find anywhere it sets a color for the text in a dropdown. Do you know where it is, mc12345678?
Mal
What is your url with a gray and a black message?
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
The site owner had me remove all the 'out of stock' items so at the moment due to a couple orders after a site 'restock', there are only black messages. It must have been something I changed long ago and am too senile to remember! ;)
Mal
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Code:
if($products_options->fields['products_quantity'] > 0){
$PWA_STOCK_QTY = PWA_STOCK_QTY . $products_options->fields['products_quantity'] . ' ';
}
else{
$products_options->fields['products_options_values_name'] = PWA_OUT_OF_STOCK . $products_options->fields['products_options_values_name'];
}
I know more about nuclear physics (which is nothing) than I do about databases and am embarrassed to essentially be asking for someone to write code for me, but basically what I want to happen is that if there are items available, complete the if statement, but if the stock is 0, change the code in red so it removes that entire attribute from the database. Anyone care to help a senile old fart, or point me in a direction so I can figure it out by myself? I've been looking for sections of code that do that, but can't seem to find any (again, I'm using a very old version of 1.53 of SBA).
Mal
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
Malaperth
but basically what I want to happen is that if there are items available, complete the if statement, but if the stock is 0, change the code in red so it removes that entire attribute from the database. Anyone care to help a senile old fart, or point me in a direction so I can figure it out by myself? l
What you are trying to do here is not exactly an "easy" task.
About the best I can do with the time available to me is direct you to how the SBA module itself does this. In simple terms, the SAB page/code itself
/admin/products_with_attributes_stock.php creates links to the attribute to be deleted.
These links read like:
<a href="http://yourdomain.com/youradmin/products_with_attributes_stock.php?action=delete&products_id=1234&attributes=543 21">Delete Variant</a>
So in theory, it is a matter of determining the products_id and the attributes value from the page where your code is found, inserting these into this URL and then having your code load the /products_with_attributes_stock.php page.
In practice this isn't going to work though, firstly because this is admin related code it won't work from the store front unless you are a logged in admin.
Secondly, if you could run this code from the location indicated it would take the customer away from thier current page to the attributes deletion code, and you'll then need some way to direct them back to where they were, so as I say, this method won't work.
Now having said that, the /products_with_attributes_stock.php code itself has everything that is needed to safely perform these deletions, so you could copy the relevant part of the code and create a 'function' from it specifically for this task, and that will overcome the problems I've just mentioned.
Your code snippet could then be coded something like:
Code:
if($products_options->fields['products_quantity'] > 0){ $PWA_STOCK_QTY = PWA_STOCK_QTY . $products_options->fields['products_quantity'] . ' ';
}
else{
my_delete_function($productID, $arributeValue) ;
}
Now having said that, do you *really* want the attributed product deleted, or are you happy for them to simply not been shown to the customer?
Although difficult to say without testing/checking, if you are happy to just have them not be shown, you could probably just comment out your line
that reads
$products_options->fields['products_options_values_name'] = PWA_OUT_OF_STOCK . $products_options->fields['products_options_values_name'];
and the out of stock item(s) won't appear in the list.
At least that's the theory.
Cheers
RodG
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Thanks, RodG! A direction I asked for and a direction I got! Can't ask for much more than that! And, if I can't figure out how to actually delete it, the customer will never know it isn't deleted if she doesn't see it... ;)
Mal
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
jeking
What is your url with a gray and a black message?
Jeking, go to sweetsagescents.com, click on the Wax Tarts category and check out the dropdown on the product ***SALE, SALE, SALE*** Sale Scent Shots. The first out of stock is in black type, the rest are 'greyed out'. At this point, I don't have the time to do any debugging or even look at the tools that are available in Firefox, but at least now you can see what I mean and that I'm not crazy (well, not for that reason anyway... ;) ).
Mal
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
Malaperth
Jeking, go to sweetsagescents.com, click on the Wax Tarts category and check out the dropdown on the product ***SALE, SALE, SALE*** Sale Scent Shots. The first out of stock is in black type, the rest are 'greyed out'. At this point, I don't have the time to do any debugging or even look at the tools that are available in Firefox, but at least now you can see what I mean and that I'm not crazy (well, not for that reason anyway... ;) ).
Mal
Answer is that the single dropdown (single attribute) code incorporates disabling of out-of-stock items (this was code implemented to the SBA dropdown attribute type. If not mistaken if the attribute type for products such as this is instead chosen as a standard dropdown, then the greying will not occur.
For multiple attributes, (two or more dropdowns), something like this is in the works for incorporation, but is expected to involve admin controllable options because of the potential complexity of ways to be presented.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
mc12345678
Answer is that the single dropdown (single attribute) code incorporates disabling of out-of-stock items (this was code implemented to the SBA dropdown attribute type. If not mistaken if the attribute type for products such as this is instead chosen as a standard dropdown, then the greying will not occur.
For multiple attributes, (two or more dropdowns), something like this is in the works for incorporation, but is expected to involve admin controllable options because of the potential complexity of ways to be presented.
Well, I have not been able to find the admin 'command' or whatever you wish to call it for simply not showing out of stock items, and when creating the attribute, I change nothing as far as the select itself, I just add the attribute name and insert it, then add values. My issue is that something seems to be following two code paths (which I easily could have screwed up myself by editing the wrong thing or doing it the wrong way long ago) since some come out black and some grey.
Mal
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
Malaperth
Jeking, go to sweetsagescents.com, click on the Wax Tarts category and check out the dropdown on the product ***SALE, SALE, SALE*** Sale Scent Shots. The first out of stock is in black type, the rest are 'greyed out'. At this point, I don't have the time to do any debugging or even look at the tools that are available in Firefox, but at least now you can see what I mean and that I'm not crazy (well, not for that reason anyway... ;) ).
Mal
Not sure what version of Zen Cart you're using but in Zen Cart 1.5.4 if you don't want them to grey out then you have the set Configuration > Stock > Allow Checkout = True. However it will do as it says, allow customers to checkout even though the item is not in stock. I recommend to keep it set to False though just for the overall customer experience.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
Invizix
Not sure what version of Zen Cart you're using but in Zen Cart 1.5.4 if you don't want them to grey out then you have the set Configuration > Stock > Allow Checkout = True. However it will do as it says, allow customers to checkout even though the item is not in stock. I recommend to keep it set to False though just for the overall customer experience.
I've added the "greying" out of the options for multiple attributes for when out-of-stock items is displayed and meets a few other conditions for consistency between multiple attributes and single. The grey out on the single attributes was to prevent selection of the out-of-stock item(s) when not allowed to add an out-of-stock item to the cart both for functionality and appearance. Now that there is more cart control to the code, that grey out option technically could be made a selectable choice. Seems that it should be a css controlled aspect, but information varies through internet searches depending on the browser used by the visitor and the version of that browser.
Haven't uploaded this changed code as I want to tackle a couple of other things first and have had some work to do for other clients. Should have it up hopefully soon though.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
mc12345678
I've added the "greying" out of the options for multiple attributes for when out-of-stock items is displayed and meets a few other conditions for consistency between multiple attributes and single. The grey out on the single attributes was to prevent selection of the out-of-stock item(s) when not allowed to add an out-of-stock item to the cart both for functionality and appearance. Now that there is more cart control to the code, that grey out option technically could be made a selectable choice. Seems that it should be a css controlled aspect, but information varies through internet searches depending on the browser used by the visitor and the version of that browser.
Haven't uploaded this changed code as I want to tackle a couple of other things first and have had some work to do for other clients. Should have it up hopefully soon though.
The code is functioning as it is supposed to and putting the item out of stock. The issue was literally the difference between the color of the "Out of Stock" message itself. In some parts it is black and in some parts it is grey. I cannot find the place(s) that it sets the colors in the css file or where it is set programatically, that is my issue. My apologies for not making that clear earlier. I am just confused since it must somehow be following two different code paths and I cannot find either.
Mal
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
Malaperth
The code is functioning as it is supposed to and putting the item out of stock. The issue was literally the difference between the color of the "Out of Stock" message itself. In some parts it is black and in some parts it is grey. I cannot find the place(s) that it sets the colors in the css file or where it is set programatically, that is my issue. My apologies for not making that clear earlier. I am just confused since it must somehow be following two different code paths and I cannot find either.
Mal
To help a little further considering that this has been requested before in one way or another, please provide a product link to two products that meet the following criteria:
1. Each product has one attribute.
2. Each product has at least one selection that is out of stock.
3. Both links are on the same site.
4. Each link points to a different product where one shows an out-of-stock option as greyed out the other to a product that shows the "black" attribute for the out-of-stock option.
If product does not match the above criteria, then the issue is being addressed through the greying out option described above.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
mc12345678
To help a little further considering that this has been requested before in one way or another, please provide a product link to two products that meet the following criteria:
1. Each product has one attribute.
2. Each product has at least one selection that is out of stock.
3. Both links are on the same site.
4. Each link points to a different product where one shows an out-of-stock option as greyed out the other to a product that shows the "black" attribute for the out-of-stock option.
If product does not match the above criteria, then the issue is being addressed through the greying out option described above.
sigh... It figures. I update the site every Friday and just finished. It was present when I sent the reply to Jeking earlier in the thread and there were grey and black out-of-stock messages in the same dropdown (single attribute, same site). I will PM you when it happens again.
Mal
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
Invizix
Not sure what version of Zen Cart you're using but in Zen Cart 1.5.4 if you don't want them to grey out then you have the set Configuration > Stock > Allow Checkout = True. However it will do as it says, allow customers to checkout even though the item is not in stock. I recommend to keep it set to False though just for the overall customer experience.
Invizix, it was the color of the text and not the functionality which is why I mentioned grey and black text. I should not have used the term "greyed out" as that has other connotations.
Mal
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
simon1066
Zen v1.54
SBA v1.54
Zen Magnific v1.5
DPU v3.0.2
I been attempting to debug the 'second SBA dropdown not working' on my site. Looking at the thread I can see that a couple of things have been tried i.e. validating the page to sort problems with broken tags etc - done. Incorporating an edit by mc12345678 into pad_sba_sequenced_dropdowns - done I'm using the latest from github.
I think I've now isolated the problem to a conflict with Dynamic Price Updater, if I turn it off then the SBA dropdowns work. As there are no common files between the two mods I think it might be a jscript issue. I've been looking for conflicts as much as I'm able but still no joy.
It's time to ask for help. Has anyone had this conflict between the two mods?
I have it on a test site if it helps and would rather PM you the link if you don't mind.
Here's a post I made to the wrong thread by mistake, quoting it here as it belongs here.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Ok, fresh install of zencart 1.54, DPU_3.0.2 & stock_by_attribute_1.5.4-mc12345678_ZC154
the second dropdown of sba_sequenced_dropdowns does not populate, turn off DPU and it works. So regardless of my other confused posts in SBA threads - I'm probably not losing it.
Dynamic Dropdown settings:
Enable Dynamic Dropdowns 2
Product Info Single Attribute Display Plugin multiple_dropdowns
Show Out of Stock Attributes True
Product Info Multiple Attribute Display Plugin sba_sequenced_dropdowns
Mark Out of Stock Attributes Right
Display Out of Stock Message Line True
Prevent Adding Out of Stock to Cart True
SBA Number of Records to Displayed 25
Settings in admin/catalog/products_with_attributes_stock_(SBA)
- added attribute quantities in for product_id 1 (Matrox G200 MMS) - 'All attributes combo for both 'model' and 'memory' option names - quantity '1',
- synced quantities
DPU settings
Dynamic Price Updater Status false
Dynamic Price Updater Version 3.0
Where to display the price productPrices
cart_quantity
Where to display the weight productWeight
show a small loading graphic true
Show currency symbols true
Show product quantity false
Where to display the second price cartAdd
mc12345678, as it seems you are doing most of the current work on this mod, perhaps you can use this information to debug SBA or perhaps DPU which I think is Design75/Chrome's contribution.
Surprising that I might be the first to highlight this, these two excellent mods go so well together - but then I think the dynamic dropdowns are a relatively new inclusion into SBA, I could be mistaken though.
cheers
Simon
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Reading this now trying to pay attention to all of the details. First thing I see is that using the branch that is not currently up-to-date with the master... Nice try, but the mc12345678_ZC154 branch is now like 6 commits behind the master (https://github.com/potteryhouse/stoc...ZC154...master). It might explain some of the non-functionality seen as there were still a few thiings presented javascriptwise that were causing issues... Yes, yes, yes I get it that so many things to keep up with and possibly confusing, and and and... We're all doing what we can with the "free" time available as energy is focused on those things that provide income... (This last part is/was not exactly pointed at you simon1066, but I can read the signs of things to come... :P)
As still working on some of the fundamentals of the code to ensure the stability and groundwork needed to support such additional plugins, I have had a go with that one (though expect it to be a huge plus to the code)
Anyways, long and short, may I suggest trying the master branch and then providing the detailed feedback that would be necessary to resolve issues of that branch.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Correction (key presses not registered and then ran out of time to save the edit):
Quote:
As still working on some of the fundamentals of the code to ensure the stability and groundwork needed to support such additional plugins, I have *NOT* had a go with that one (though expect it to be a huge plus to the code)
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Thanks mc12345678. I see that the SBA github file I referenced was your branch, I think I got confused with the branches when looking for the right link to post. The actual version on my install was the master - https://github.com/potteryhouse/stoc...ttribute_1.5.4, last edited a month ago.
I'll have a go at providing detailed feedback although github is still a bit of a mystery to me.
I appreciate your comments weren't exactly aimed at me but it looks as though I might have given the impression that I was impatient for this to work. I didn't mean it to come across that way, I was only trying to give some feedback to help with the development of this mod.
Thank you for the excellent work you are doing for Zencart. :thumbsup:
Cheers
Simon
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Darn, I was really hoping it was the older version and that the more recent verson would have corrected some/all of those issues. It may be that I still haven't uploaded the version that is working for me also... I'm trying not to cause any issues by uploading too early, want to try to get it right. :)
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Stock By Attribute (SBA) Stock Page Version 1.5.4
(You are presently using: v1.5.4)
Hi
Any help at all much appreciated!
My site doesnt notify of the item/attribute out of stock message for any item that has 0 quantity in the sba data, if the other attributes have quantity.
it allows the item in the cart without any message up untill the "total" quantity available (all attribute qty's added up).
if t-shirt - green has 2 qty, and t-shirt - red has 2 qty, and t-shirt - blue has 0 qty; t-shirt blue has no message until the qty for blue is up to 5 in the cart.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
merica
Stock By Attribute (SBA) Stock Page Version 1.5.4
(You are presently using: v1.5.4)
Hi
Any help at all much appreciated!
My site doesnt notify of the item/attribute out of stock message for any item that has 0 quantity in the sba data, if the other attributes have quantity.
it allows the item in the cart without any message up untill the "total" quantity available (all attribute qty's added up).
if t-shirt - green has 2 qty, and t-shirt - red has 2 qty, and t-shirt - blue has 0 qty; t-shirt blue has no message until the qty for blue is up to 5 in the cart.
What are the settings on the product for Product Qty Min/Unit Mix? Is there only one option name associated with the product having say these three option values? When was the software installed in this system downloaded from https://github.com/potteryhouse/stoc...tribute_1.5.4?
And the out-of-stock message you are talking about is that shown on the screen or in the cart, but not the low-stock email, correct?
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
installed sba between 4-3 months ago.
i changed the value to no with same results.
one option name and 3 option values. there are more values associated with the option name but not for this product.
havent checked the emails, right now showing (or not showing) in the cart screen on top and next to item name.
it's allowing the purchase of not-in-stock attributes. if one attribute has zero stock, that att can still checkout as long as it's qty doesnt become larger than the combined total of the other three att qty's.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Stock ID Unique Combo Variant Quantity Sort Order Custom ID Description Edit Delete
4545 303-6358 Color: Black
0 0 Edit Quantity Delete Variant
4549 303-6453 Color: Steel
0 0 Edit Quantity Delete Variant
4546 303-6455 Color: White
2 0 Edit Quantity Delete Variant
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
merica
installed sba between 4-3 months ago.
i changed the value to no with same results.
one option name and 3 option values. there are more values associated with the option name but not for this product.
havent checked the emails, right now showing (or not showing) in the cart screen on top and next to item name.
it's allowing the purchase of not-in-stock attributes. if one attribute has zero stock, that att can still checkout as long as it's qty doesnt become larger than the combined total of the other three att qty's.
Quote:
Originally Posted by
merica
Stock ID Unique Combo Variant Quantity Sort Order Custom ID Description Edit Delete
4545 303-6358 Color: Black
0 0 Edit Quantity Delete Variant
4549 303-6453 Color: Steel
0 0 Edit Quantity Delete Variant
4546 303-6455 Color: White
2 0 Edit Quantity Delete Variant
Back in June there was a similar issue identified and coorrected. Would suggest reinstalling the primary files of SBA 1.5.4. If you still have a copy of the version you used to install on the system you can compare the new files to those and identify which files need to be replaced, added, or removed. Sorry for not mnaging "versions" better, I will begin adding some indicator other than the github recorded file date.
I tested conditions siimilar to above on a fresh install and did not come across the problem using the updated files.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
OK, I check it out. Also the one-click on-page qty update feature doesnt work.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
merica
OK, I check it out. Also the one-click on-page qty update feature doesnt work.
Relatively fixed as well, though if there are validation issues on the page then that may affect the operation... But there were some issues with it around that time as well..
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Is there a way to get the new version from github to display the qty available next to the option in the drop down list like it does for out of stock items on multiple drop downs? Also have out of stock display for a single drop down would be nice too as that currently doesn't work?
I have tried the recommendation from the wiki, that links to some archived forum thread on here and details some code to add but that doesn't work (with zencart 1.5.4 and the lastest version from github of this mod) and just causes the page not to load, so I assume that the code needs to be revised but I have no idea what needs to be tweaked?
~D
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
Draxwyn
Is there a way to get the new version from github to display the qty available next to the option in the drop down list like it does for out of stock items on multiple drop downs? Also have out of stock display for a single drop down would be nice too as that currently doesn't work?
I have tried the recommendation from the wiki, that links to some archived forum thread on here and details some code to add but that doesn't work (with zencart 1.5.4 and the lastest version from github of this mod) and just causes the page not to load, so I assume that the code needs to be revised but I have no idea what needs to be tweaked?
~D
I'm sorry in reference to the second paragraph, going to have to be more specific than read somethng somewhere to do somethng that didn't work...
As to the other "issues", out-of-stock notifications are incorporated into some of the single dropdown options, need more information about setup to identify why that is not workng for you. As to quantity available being displayed for product with multiple attributes, I can't recall at the moment if it has been added yet or not, but if it were, it would be a matter of switch settings. Also it would only be displayed at the moment at the last selecton.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Thanks for the reply.
Quote:
Originally Posted by
mc12345678
I'm sorry in reference to the second paragraph, going to have to be more specific than read somethng somewhere to do somethng that didn't work...
It was a wiki referenced in this thread for this module, here is the link;
https://www.zen-cart.com/wiki/index...._by_Attributes
scroll down to '16.2 How can I show the amount of stock available next to each attribute on the product information page?' That then links to a another thread on here but details the posts to look at, link;
https://www.zen-cart.com/showthread....8OLD%29/page11
I tried implementing the 'fixed' code but that is what causes a the page to load a blank page. Unfortunately my php and sql programming skills are a little rusty so anything more than basic tweaks aren't going to happen.
Quote:
Originally Posted by
mc12345678
As to the other "issues", out-of-stock notifications are incorporated into some of the single dropdown options, need more information about setup to identify why that is not workng for you. As to quantity available being displayed for product with multiple attributes, I can't recall at the moment if it has been added yet or not, but if it were, it would be a matter of switch settings. Also it would only be displayed at the moment at the last selecton.
Clean install of zencart 1.5.4
Then template winchester responsive
Then SEO URL mod
Then Big Royal Mail 3.3.0a mod
Then Cookies mod
All files that needed merging where done carefully with winmerge.
All the above working perfectly then I installed stock_by_attribute_1.5.4-master, created 1 product and setup to use SBA with a 'size' option dropdown and 10 options on the list, 2 with 0 qty the rest with a random positive number.
I have noticed that the big royal mail mod is setup to use read only attributes which the SBA ignores and tries to use as multi dropdown, so I have disabled the big royal mail mod until I can see if this works properly, none of the other mods interfere with this one and all files where merged carefully with winmerge.
So when displaying the the single standard dropdown it appears just as it would normally in a clean un-modded version of zencart, it shows the size for example Large and that is it, no out of stock for the 2 that are 0 qty. I tried changing the dropdown to an SBA dropdown but no change.
I used to use a version of SBA 4 years (or more) ago and it used to display the qty next to the size, but had other bugs that meant I could not use it on a live site, but this new version that works on zencart 1.5.4 seems to have fixed those bugs, but doesn't display the qty. As I am doing a complete site over haul (not live) to clean up the catalogue and code, and SBA is something I have needed for sometime I thought it would be great to get this installed to use.
~D
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
If the above "instructions" are complete and the correct terminology was used, then the sba variants sound like they need to be cleared and readded to only have one attribute per variant. The other thing to check is your settings for SBA display stock on product listing set in configuration->Stock.
Terminology to which I refer is readonly attributes as compared to display only... Both are intended to be view only information, but display only is an option value where read only is associated with an option name.
The plugn does show qty when setup properly, so that ssue is addressed. Read only is still being worked on at least in the multiple attribute side.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
mc12345678
If the above "instructions" are complete and the correct terminology was used, then the sba variants sound like they need to be cleared and readded to only have one attribute per variant. The other thing to check is your settings for SBA display stock on product listing set in configuration->Stock.
Terminology to which I refer is readonly attributes as compared to display only... Both are intended to be view only information, but display only is an option value where read only is associated with an option name.
The plugn does show qty when setup properly, so that ssue is addressed. Read only is still being worked on at least in the multiple attribute side.
Thanks. I reverted the code changes I made, deleted the products and started a new product with just the size and it does display the qty! So now it is on to get the rest of the site setup and start adding products.
And yes the big royal mail mod is setup as read only attributes, for the different sizes of the items, and adding these does break SBA. But I can still use that mod for the postage side just everything has to be sent as a small parcel even if it happens to be able to go as a large letter, just to make use it has enough postage paid.
I'll keep an eye on this mod to see if there are any updates for getting read only attributes working with it.
Thanks
~D
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
Draxwyn
Thanks. I reverted the code changes I made, deleted the products and started a new product with just the size and it does display the qty! So now it is on to get the rest of the site setup and start adding products.
And yes the big royal mail mod is setup as read only attributes, for the different sizes of the items, and adding these does break SBA. But I can still use that mod for the postage side just everything has to be sent as a small parcel even if it happens to be able to go as a large letter, just to make use it has enough postage paid.
I'll keep an eye on this mod to see if there are any updates for getting read only attributes working with it.
Thanks
~D
It's next on the list with this plugin in parallel with applying the correct tags around the attributes to be able to hide the read only attributes (and others) in support of such other mods.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Hi,
I have just installed SBA on a test environment and it all seems to work but was hoping somebody could answer a quick question.
Is it possible to assign an already existing product ID to an attribute ID and get them to sync their quantities?
For example:
Ocean Original Waders (Visible listing on website, with 3 attributes below)
Size 5 (Attribute ID:10 - linked to separate product below for Quantities)
Size 6 (Attribute ID:11 - linked to separate product below for Quantities)
Size 7 (Attribute ID:12 - linked to separate product below for Quantities)
Product ID: 10 Ocean Original Waders Size 5 (Individual product but not shown on website)
Product ID: 11 Ocean Original Waders Size 6 (Individual product but not shown on website)
Product ID: 12 Ocean Original Waders Size 7 (Individual product but not shown on website)
So if I go and change the quantity of Product ID: 10 (individual product) the corresponding attribute for the visible listing Ocean Original Waders would update.
Reason I am asking is because my employer's website and EPOS system are sync'd and the EPOS system is restricted in that each and every product option/variant must be listed individually.
My testing leads me to think that this module will not do this but could somebody please let me know if I have overlooked something or just confirm if I am right?
Will be disappointed if it can't but would love to know for certain.
Thanks in advance, :smile:
Mathew
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
If your EPOS system is based on having a unique identifier, this plugin offers identifying an additional field where such an assignment/identification can be made... Overall, may require the EPOS pointing to a different set of data, but that part is possible.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
The EPOS system does require a unique identifier. I had hoped I missed something but deep down I expected it would be the EPOS system that would need adjusting, although sadly that is beyond my expertise. Won't hurt to enquire with our providers though so I will do just that.
Thank you for taking the time to get back to me, really appreciated. :smile:
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
AnglersCorner
The EPOS system does require a unique identifier. I had hoped I missed something but deep down I expected it would be the EPOS system that would need adjusting, although sadly that is beyond my expertise. Won't hurt to enquire with our providers though so I will do just that.
Thank you for taking the time to get back to me, really appreciated. :smile:
You know though, all that said, yes additional coding could be added to accomplish whatu are wanting without modifying the EPOS, but I would say it would be some custom coding and would also depend on the interation(s) the EPOS has with ZC, because each "transaction" type would need to be addressed as to stock quantities and to which product(s) such a stock change is to apply...
But base code, no it does not operate as inquired about.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
For those using version 1.5.4 of this plugin (ZC 1.5.3 or 1.5.4) an update was uploaded to github (http://github.com/potteryhouse/stock_by_attribute_1.5.4) to address/provide the following:
1) The ability to delete all variants for a product from the admin catalog SBA screen instead of having to delete each individually.
2) Sorting of the variants internally by option name sort order and then each variant (including multi-option/multi-attribute) by option value along the option name sort order). This is a change away from internally sorting by option name and then by the option value sort order of the option value that had the lowest attribute_id for each variant. Effect is seen by selecting the sort button from the admin catalog SBA screen and only modifies the display order in the admin panel. A separate update is expected to provide sorting with respect of the attrbute sort order seen on the store front with possibility of a dropdown sort selector to view the data in different sequences.
3) Added a "quick-fix" to the single dropdown verson of the dynamic dropdowns feature to provide a message like: Please select from below as the first option to ensure a proper selection by the customer before adding a product to the shopping cart. The "quick-fix" part is that a typical message as expected for a display only attribute is not provided, so yes it is known that some additional user experience code is needed.
4) Added the ability to provide ZC standard attribute tags surrounding option names when generated by the sba_sequenced_dropdown. There is a new admin switch in the configuration->Dynamic Dropdowns menu to switch between the original Dynamic Dropdowns tags (table formatted with class="main") and the ZC standard attribute style of html tags. This supports CSS formatting of the attributes similar to the default ZC and supports other plugins like flexible attributes and is active by default. There remains one caveat to the usage of this style of formatting in that Dynamic Dropdowns, although not yet directly implemented in this plugin, is that if an attribute is identified as not being stock dependent, then the option names displayed may be negatively affected if the non-stock dependent attribute is to be displayed and is in a sequence that would normally appear above any of the stock dependent attributes. Again, not yet an issue with the way this plugin currently operates when using the sba_sequenced_dropdown option.
Read-only attributes remain to be addressed; however, didn't want to wait on publishing the above modifications that for the most part have been requested or seen as a potential issue.
On the topic of read-only attributes, the following is identified as needing to be addressed/modified to properly support the widest foreseen functionality:
1) Ability to modify a variant that is generated to remove a read-only attribute. Why? Read-only attributes (Read only option names) have the ability to have multiple option values assigned. Then in the attribute controller, any combination of these read-only option values may be assigned to the product. Drill down further as a result of the capabilities of this plugin, it may be desirable for each variant to have a different read-only option value assigned to each variant. While it is possible to generate such a variant for each applicable variant, one thing to try to do is to always provide the "fastest" way to populate variants and/or modify them to suit within the "acceptable" allowances and to accommodate methods to accomplish that.
2) Modify the admin add option values options for read-only attributes to allow individual and multiple selection of read-only option values for addition to the variant(s), as well as an option for all read-only option values to be added to each variant or if they should be individually added. The latter requiring deletion of the variants that are not to be applicable or provide a further method of identifying to which other option name/value pair(s) to apply the read-only attribute (thinking that at some point have to draw a line on this one, but at least provide some method(s) to minimize the headache of applying this aspect). More than likely to use check-boxes instead of a dropdown for this selection process of choosing the actual read-only attributes to which this applies.
3) Modify the Dynamic Dropdown aspect of sba sequenced dropdowns to support/recognize read-only attributes as non-"selectable" items (meaning no First please select nor Then Select dropdown menu entries).
4) Modify the Dynamic Dropdown aspect of sba sequenced dropdowns to ensure that display of the read-only attribute(s) is only for the applicable selection(s) ahead of it (ie. read-only attribute can change if dependent on the previous selection(s), though something may be required to "always" display a read-only attribute as compared to a specific read-only attribute for a selection made in a variant (perhaps identify if a read-only attribute is applied to all variants, then it stands to reason that it is constant and should be "displayed" even if CSS is used to then hide it.)) Some of this modification will resolve a separate issue where if no physical product (variant) is available/exists for selection of one of the option values, dynamic dropdowns is active, sba_sequenced_dropdown is selected for multiple attribute product, and display of out-of-stock items is active then the variant can appear to exist to the visitor (including "adding to the cart" if out-of-stock product can be added to the cart even though it does not exist.
So, perhaps you can somewhat see that there are several pieces to this puzzle currently identified. The first two a bit more "important" than the last two as a path is seen to move forward to possibly not use the specific dynamic dropdown code integrating the functionality further into the includes/modules/attributes.php aspect of operation which would also remove the modified template file to support dynamic dropdowns...
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Is there a way to get the products name to show in the downloadable tableSBAdata ? If there is ,can somebody tell me how to do it please ?
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
cefyn
Is there a way to get the products name to show in the downloadable tableSBAdata ? If there is ,can somebody tell me how to do it please ?
Referring to the export option that is available from the configuration->Stock By Attributes menu?
I haven't looked at that section of code recently to verify everything works as expected and what it would take to add that column on to the export and not affect the reverse import... I believe that the column is included in a similar function of EasyPopulate v4 more intended to manage stock of existing variants, but I thought product name was included...
Anyways if someone else doesn't get back to you with the how to add product name to the export, I'll take a look.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Thanks for replying. Yes , that's what I'm referring to. I've found it more reliable than EP4 for accurately updating attribute quantities , just that it's tedious to be looking for each products model no.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
cefyn
Thanks for replying. Yes , that's what I'm referring to. I've found it more reliable than EP4 for accurately updating attribute quantities , just that it's tedious to be looking for each products model no.
Sorry to focus on the specific terminology here, but based on the conversation it seems to me that the "reliability and accuracy" part of the issue is on the operator not the software. Until just now, no one has commented requesting any other sort method for the export/importof SBA quantities in EP4. While the issue of adding the name to the import/export file of SBA remains to be resolved for this case, there is now an item to address in EP4.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
My question is about the custom id. Using zen cart 1.5.4 and stock by attribute 1.5.4. The custom id shows on invoice , email , order history . If I search for a product in the search boxes available , category/product search ,
stock by attribute/ search , the product id ,product name , and product model , will all locate the product.
Is there a way to have the admin search use the SBA customid to find a product ? Thanks.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
cefyn
My question is about the custom id. Using zen cart 1.5.4 and stock by attribute 1.5.4. The custom id shows on invoice , email , order history . If I search for a product in the search boxes available , category/product search ,
stock by attribute/ search , the product id ,product name , and product model , will all locate the product.
Is there a way to have the admin search use the SBA customid to find a product ? Thanks.
Haven't tred/developed yet, but around lines 2s0 and 2f0 of admin/includes/modules/category_product_listing.php there appears to be a comparison of entered search content against various fields in the database... This is where it seems that the customid for SBA could be factored in.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
I think at least admin/includes/modules/product/collect_info and admin/includes/modules/product/preview_info will also have to be changed, and probably some other files as well -by somebody who understands php,mysql,and the zencart relational database -which somebody is not me. If I want to go any further with this I will have to pay to get some custom coding done , I reckon , thanks.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
cefyn
I think at least admin/includes/modules/product/collect_info and admin/includes/modules/product/preview_info will also have to be changed, and probably some other files as well -by somebody who understands php,mysql,and the zencart relational database -which somebody is not me. If I want to go any further with this I will have to pay to get some custom coding done , I reckon , thanks.
Why again (though really the first time asking) do you think that the product collection and storage files need touching to support search on the customid that is stored/captured in the catalog->SBA menu?
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
I was looking at this and copying it's structure
https://www.zen-cart.com/downloads.php?do=file&id=442.
It's an example of a new product identifier being successfully installed and made available to search.
When I did this in admin/includes/modules/category_product_listing
$products_query_raw = ("select p.products_type, p.products_id, pd.products_name, p.products_quantity,
p.products_image, p.products_price, p.products_date_added,
p.products_last_modified, p.products_date_available,
p.products_status, p2c.categories_id,
p.products_model,
p.products_quantity_order_min, p.products_quantity_order_units, p.products_priced_by_attribute,
p.product_is_free, p.product_is_call, p.products_quantity_mixed, p.product_is_always_free_shipping,
p.products_upc, pas.customid,
p.products_quantity_order_max, p.products_sort_order,
p.master_categories_id
from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, "
. TABLE_PRODUCTS_TO_CATEGORIES . " p2c, "
. TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK . " pas
where p.products_id = pd.products_id
and p.products_id = pas.products_id
and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
and (p.products_id = p2c.products_id
and p.master_categories_id = p2c.categories_id)
and (
pd.products_name like '%" . zen_db_input($_GET['search']) . " %'
or pd.products_description like '%" . zen_db_input($_GET['search']) . "%'
or p.products_id = '%" . zen_db_input($_GET['search']) . "%'
or p.products_upc = '%" . zen_db_input($_GET['search']) . "%'
or pas.customid = '%" . zen_db_input($_GET['search']) . "%'
or p.products_model = '%" . zen_db_input($_GET['search']) . " % ')" .
$order_by);
} else {
$products_query_raw = ("select p.products_type, p.products_id, pd.products_name, p.products_quantity,
p.products_image, p.products_price, p.products_date_added,
p.products_last_modified, p.products_date_available,
p.products_status, p.products_model,
p.products_quantity_order_min, p.products_quantity_order_units, p.products_priced_by_attribute,
p.product_is_free, p.product_is_call, p.products_quantity_mixed, p.product_is_always_free_shipping,
p.products_upc, pas.customid,
p.products_quantity_order_max, p.products_sort_order
from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK . " pas
where p.products_id = pd.products_id
and pas.products_id = p.products_id
and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
and p.products_id = p2c.products_id
and p2c.categories_id = '" . (int)$current_category_id . "'" .
$order_by);
}
although no errors are produced search still won't find the product by it's uniqueid.However I did similar changes to preview_info and collect_info and it still doesn't work, so I'm missing a relationship somewhere .
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Not in front of a computer, but unless every product in your store is also tracked by attributes, my guess is the product not stocked by attributes is no longer locateable by search.
For one thing the SBA table needs to be left joined on the query. But then if a search is performed on a sba tracked item on a field not in the sba table for a product tracked by sba, then one row for each variant of the product will be returned. Pair this with the second query returns the customid (when not doing a search) and if it does so for some purpose of display then would want to do the same thing in the search query.
My thought though and I still need to run the query through a database test, would be to either apply distinct to the first (search) query, left join the sba table on products_id, apply a like instead of = on the search, and remove pas.customid from the second query, but duplicate the above to it as well...
Otherwise, might add an additional query ahead of these two such that the sba table is searched, when it has a positve result of a product_id, then feed that into the search queryresult as one of the where comparisons.
Just a thought...
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
mc12345678
Not in front of a computer, but unless every product in your store is also tracked by attributes, my guess is the product not stocked by attributes is no longer locateable by search.
For one thing the SBA table needs to be left joined on the query. But then if a search is performed on a sba tracked item on a field not in the sba table for a product tracked by sba, then one row for each variant of the product will be returned. Pair this with the second query returns the customid (when not doing a search) and if it does so for some purpose of display then would want to do the same thing in the search query.
My thought though and I still need to run the query through a database test, would be to either apply distinct to the first (search) query, left join the sba table on products_id, apply a like instead of = on the search, and remove pas.customid from the second query, but duplicate the above to it as well...
Otherwise, might add an additional query ahead of these two such that the sba table is searched, when it has a positve result of a product_id, then feed that into the search queryresult as one of the where comparisons.
Just a thought...
So my eyes certainly deceived me... The pas.customid was in both queries...
Here for your specific situation is how I would rewrite this query... Mind you the products_upc field is not standard to ZC, so if/when this modification is incorporated, that field/others are likely to not be included with SBA out-of-the box.
Code:
$products_query_raw = ("select DISTINCT p.products_type, p.products_id, pd.products_name, p.products_quantity,
p.products_image, p.products_price, p.products_date_added,
p.products_last_modified, p.products_date_available,
p.products_status, p2c.categories_id,
p.products_model,
p.products_quantity_order_min, p.products_quantity_order_units, p.products_priced_by_attribute,
p.product_is_free, p.product_is_call, p.products_quantity_mixed, p.product_is_always_free_shipping,
p.products_upc, pas.customid,
p.products_quantity_order_max, p.products_sort_order,
p.master_categories_id
from " . TABLE_PRODUCTS . " p LEFT JOIN "
. TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK . " pas on (pas.products_id = p.products_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd, "
. TABLE_PRODUCTS_TO_CATEGORIES . " p2c, "
. TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK . " pas
where p.products_id = pd.products_id
and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
and (p.products_id = p2c.products_id
and p.master_categories_id = p2c.categories_id)
and (
pd.products_name like '%" . zen_db_input($_GET['search']) . "%'
or pd.products_description like '%" . zen_db_input($_GET['search']) . "%'
or p.products_id = '%" . zen_db_input($_GET['search']) . "%'
or p.products_upc = '%" . zen_db_input($_GET['search']) . "%'
or pas.customid like '%" . zen_db_input($_GET['search']) . "%'
or p.products_model = '%" . zen_db_input($_GET['search']) . "%')" .
$order_by);
} else {
$products_query_raw = ("select p.products_type, p.products_id, pd.products_name, p.products_quantity,
p.products_image, p.products_price, p.products_date_added,
p.products_last_modified, p.products_date_available,
p.products_status, p.products_model,
p.products_quantity_order_min, p.products_quantity_order_units, p.products_priced_by_attribute,
p.product_is_free, p.product_is_call, p.products_quantity_mixed, p.product_is_always_free_shipping,
p.products_upc, pas.customid,
p.products_quantity_order_max, p.products_sort_order
from " . TABLE_PRODUCTS . " p LEFT JOIN "
. TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK . " pas on (pas.products_id = p.products_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK . " pas
where p.products_id = pd.products_id
and pas.products_id = p.products_id
and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
and p.products_id = p2c.products_id
and p2c.categories_id = '" . (int)$current_category_id . "'" .
$order_by);
}
The above will produce results that will list all variants of a product when either listing the products in a category or when searching on a value that is not in the customid of the sba variant(s). The returned data has an additional field (pas.customid) that if not used should be removed to restore the "normal" returned dataset but searchable by the customid. If the returned pas.customid is kept in the returned data, then suggest changing up the row's display action as the normal product_info page has no direct relatonship with the tracked SBA quantities.
Btw, I too had some trouble using the search function with the original posted code, but found there were some spaces whether intially entered or some odd posting fluke known to occasionally happen I do not know, but the above worked in a sql query.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Now you're being too kind mc , any spaces in the original code are entirely due to an inaccurate and unreliable operator guessing what the code should be .
Your amendments have it working just as you say, and the next thing for me to try and do is to change the rows display action. Thank you (once again) for giving so generously of your time and expertise . Thank you also for encouraging me to look for a solution here . Zen Cart rocks .
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
In case anyone else finds this useful,I found the above , as is, was giving me table alias errors. I am using:
$products_query_raw = ("select DISTINCT p.products_type, p.products_id, pd.products_name, p.products_quantity,
p.products_image, p.products_price, p.products_date_added,
p.products_last_modified, p.products_date_available,
p.products_status, p2c.categories_id,
p.products_model,
p.products_quantity_order_min, p.products_quantity_order_units, p.products_priced_by_attribute,
p.product_is_free, p.product_is_call, p.products_quantity_mixed, p.product_is_always_free_shipping,
p.products_upc, pas.customid,
p.products_quantity_order_max, p.products_sort_order,
p.master_categories_id
from " . TABLE_PRODUCTS . " p LEFT JOIN "
. TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK . " pas on (pas.products_id = p.products_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd, "
. TABLE_PRODUCTS_TO_CATEGORIES . " p2c
where p.products_id = pd.products_id
and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
and (p.products_id = p2c.products_id
and p.master_categories_id = p2c.categories_id)
and (
pd.products_name like '%" . zen_db_input($_GET['search']) . "%'
or pd.products_description like '%" . zen_db_input($_GET['search']) . "%'
or p.products_id = '%" . zen_db_input($_GET['search']) . "%'
or p.products_upc = '%" . zen_db_input($_GET['search']) . "%'
or pas.customid like '%" . zen_db_input($_GET['search']) . "%'
or p.products_model = '%" . zen_db_input($_GET['search']) . "%')" .
$order_by);
} else {
$products_query_raw = ("select p.products_type, p.products_id, pd.products_name, p.products_quantity,
p.products_image, p.products_price, p.products_date_added,
p.products_last_modified, p.products_date_available,
p.products_status, p.products_model,
p.products_quantity_order_min, p.products_quantity_order_units, p.products_priced_by_attribute,
p.product_is_free, p.product_is_call, p.products_quantity_mixed, p.product_is_always_free_shipping,
p.products_upc, pas.customid,
p.products_quantity_order_max, p.products_sort_order
from " . TABLE_PRODUCTS . " p LEFT JOIN "
. TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK . " pas on (pas.products_id = p.products_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c
where p.products_id = pd.products_id
and pas.products_id = p.products_id
and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
and p.products_id = p2c.products_id
and p2c.categories_id = '" . (int)$current_category_id . "'" .
$order_by);
}
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
I am having a problem with this plugin and I know I have done something, again, wrong but please can you help?
I have installed as per the instructions and then ran stock_by_attr_install.php. Selected full/upgrade DB install. All was fine.
However, I had a problem with my shop so I went back to stock_by_attr_install.php and selected & ran remove all from the DB. Now this is where it all goes wrong. The problem I had was not caused by the full/upgrade DB install so, as I thought, ran full/upgrade DB install again. Now I am getting the error message 'WARNING: An Error occurred, please refresh the page and try again.'
I have tried to do a restore of the DB but that is throwing up
Quote:
Error
SQL query:
--
-- Table structure for table `ecs_address_book`
--
DROP TABLE IF EXISTS `ecs_address_book`;
MySQL said: Documentation
#1046 - No database selected
So I am stumped their. Is it possible to "pick" out the DB changes myself to see what is going on? If so what are added to the DB?
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
How about the error message generated by trying to do the install again? The other issue is related to the file made for the backup not to this module.
See the following for more guidance: http://www.zen-cart.com/content.php?124-blank-page
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
mc12345678
As requested
Code:
[16-Sep-2015 17:09:48 Europe/London] #1 trigger_error() called at [/homepages/20/d503465712/htdocs/shops/ecs/includes/classes/db/mysql/query_factory.php:155]
#2 queryFactory->show_error() called at [/homepages/20/d503465712/htdocs/shops/ecs/includes/classes/db/mysql/query_factory.php:132]
#3 queryFactory->set_error() called at [/homepages/20/d503465712/htdocs/shops/ecs/includes/classes/db/mysql/query_factory.php:262]
#4 queryFactory->Execute() called at [/homepages/20/d503465712/htdocs/shops/ecs/backoffice/stock_by_attr_install.php:682]
#5 insertDynDropdownsConfiguration() called at [/homepages/20/d503465712/htdocs/shops/ecs/backoffice/stock_by_attr_install.php:2272]
[16-Sep-2015 17:09:48 Europe/London] PHP Fatal error: 1062:Duplicate entry 'PRODINFO_ATTRIBUTE_DYNAMIC_STATUS' for key 'unq_config_key_zen' :: INSERT INTO `ecs_configuration` (configuration_title, configuration_key, configuration_value,
configuration_description, configuration_group_id, sort_order,
date_added, use_function, set_function)
VALUES
('Enable Dynamic Dropdowns', 'PRODINFO_ATTRIBUTE_DYNAMIC_STATUS', '2', 'Selects status of using this portion of the SBA plugin (Dynamic Dropdowns).', 50, 10, now(), NULL, 'zen_cfg_select_drop_down(array(array(\'id\'=>\'0\', \'text\'=>\'Off\'), array(\'id\'=>\'1\', \'text''=>\'On for All SBA Tracked\'), array(\'id\'=>\'2\', \'text''=>\'On for Multi-Attribute Only\'), array(\'id\'=>\'3\', \'text''=>\'On for Single-Attribute Only\'), ),'),
('Product Info Single Attribute Display Plugin', 'PRODINFO_ATTRIBUTE_PLUGIN_SINGLE', 'multiple_dropdowns', 'The plugin used for displaying attributes on the product information page.', 50, 20, now(), NULL, 'zen_cfg_select_option(array(\'single_radioset\', \'single_dropdown\',\'multiple_dropdowns\',\'sequenced_dropdowns\',\'sba_sequenced_dropdowns\'),'),
('Product Info Multiple Attribute Display Plugin', 'PRODINFO_ATTRIBUTE_PLUGIN_MULTI', 'sba_sequenced_dropdowns', 'The plugin used for displaying attributes on the product information page.', 50, 30, now(), NULL, 'zen_cfg_select_option(array(\'single_radioset\', \'single_dropdown\',\'multiple_dropdowns\',\'sequenced_dropdowns\',\'sba_sequenced_dropdowns\'),'),
('Use ZC default HTML Attribute Tags', 'SBA_ZC_DEFAULT', 'true', 'Controls whether to use ZC HTML tags around attributes or to use the Dynamic Dropdown Version of the tags to support modifications made by others over the years but also compatibility with other ZC plugins.<br /><br />Options:<br />true (Default)<br />false.', 50, 40, now(), NULL, 'zen_cfg_select_option(array(\'true\', \'false\'),'),
('Show Out of Stock Attributes', 'PRODINFO_ATTRIBUTE_SHOW_OUT_OF_STOCK', 'True', 'Controls the display of out of stock attributes.', 50, 50, now(), NULL, 'zen_cfg_select_option(array(\'True\', \'False\'),'),
('Mark Out of Stock Attributes', 'PRODINFO_ATTRIBUTE_MARK_OUT_OF_STOCK', 'Right', 'Controls how out of stock attributes are marked as out of stock.', 50, 60, now(), NULL, 'zen_cfg_select_option(array(\'None\', \'Right\', \'Left\'),'),
('Display Out of Stock Message Line', 'PRODINFO_ATTRIBUTE_OUT_OF_STOCK_MSGLINE', 'True', 'Controls the display of a message line indicating an out of stock attributes is selected.', 50, 70, now(), NULL, 'zen_cfg_select_option(array(\'True\', \'False\'),'),
('Prevent Adding Out of Stock to Cart', 'PRODINFO_ATTRIBUTE_NO_ADD_OUT_OF_STOCK', 'True', 'Prevents adding an out of stock attribute combination to the cart.', 50, 80, now(), NULL, 'zen_cfg_select_option(array(\'True\', \'False\'),'),
('SBA Number of Records to Displayed', 'STOCK_SET_SBA_NUMRECORDS', '25',
'Number of records to show on page:',
50, 60, now(), NULL, NULL),
('Display Javascript Popup for Out-of-Stock Selection', 'PRODINFO_ATTRIBUTE_POPUP_OUT_OF_STOCK', 'True', 'Controls whether to display or not the message for when a products attribute is out-of-stock.', 50, 90, now(), NULL, 'zen_cfg_select_option(array(\'True\', \'False\'),')
; ==> (as called by) /homepages/20/d503465712/htdocs/shops/ecs/backoffice/stock_by_attr_install.php on line 682 <== in /homepages/20/d503465712/htdocs/shops/ecs/includes/classes/db/mysql/query_factory.php on line 155
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Welp, looks like when adding new options to the Dynamiic Dropdown menu in function insertDynDropdownsConfigurationMenu, equivalent remove code was not added to the install file in the function removeDynDropdownsConfiguration.
As to the other issue somewhat depends on how you are tryng to upload it. If in phpmyadmin, need to first select the database to which it is to apply then upload/import.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
mc12345678
Welp, looks like when adding new options to the Dynamiic Dropdown menu in function insertDynDropdownsConfigurationMenu, equivalent remove code was not added to the install file in the function removeDynDropdownsConfiguration.
As to the other issue somewhat depends on how you are tryng to upload it. If in phpmyadmin, need to first select the database to which it is to apply then upload/import.
Does this mean that the data is still in the DB? Also if this is the case or not, why when I click on catalog -> Stock By Attribute (SBA), at the bottom of the page after Sync All Quantities I have the message WARNING: An Error occurred, please refresh the page and try again.
The debug files are;
Quote:
[16-Sep-2015 19:41:05 Europe/London] #1 trigger_error() called at [/homepages/20/d503465712/htdocs/shops/ecs/includes/classes/db/mysql/query_factory.php:155]
#2 queryFactory->show_error() called at [/homepages/20/d503465712/htdocs/shops/ecs/includes/classes/db/mysql/query_factory.php:132]
#3 queryFactory->set_error() called at [/homepages/20/d503465712/htdocs/shops/ecs/includes/classes/db/mysql/query_factory.php:262]
#4 queryFactory->Execute() called at [/homepages/20/d503465712/htdocs/shops/ecs/admin/includes/classes/products_with_attributes_stock.php:284]
#5 products_with_attributes_stock->displayFilteredRows() called at [/homepages/20/d503465712/htdocs/shops/ecs/admin/products_with_attributes_stock.php:730]
[16-Sep-2015 19:41:05 Europe/London] PHP Fatal error: 1146:Table 'db588038315.ecs_products_with_attributes_stock' doesn't exist :: select * from ecs_products_with_attributes_stock where products_id="529"
order by sort ASC; ==> (as called by) /homepages/20/d503465712/htdocs/shops/ecs/admin/includes/classes/products_with_attributes_stock.php on line 284 <== in /homepages/20/d503465712/htdocs/shops/ecs/includes/classes/db/mysql/query_factory.php on line 155
Quote:
[16-Sep-2015 19:41:02 Europe/London] #1 trigger_error() called at [/homepages/20/d503465712/htdocs/shops/ecs/includes/classes/db/mysql/query_factory.php:155]
#2 queryFactory->show_error() called at [/homepages/20/d503465712/htdocs/shops/ecs/includes/classes/db/mysql/query_factory.php:132]
#3 queryFactory->set_error() called at [/homepages/20/d503465712/htdocs/shops/ecs/includes/classes/db/mysql/query_factory.php:262]
#4 queryFactory->Execute() called at [/homepages/20/d503465712/htdocs/shops/ecs/admin/includes/classes/products_with_attributes_stock.php:96]
#5 products_with_attributes_stock->update_all_parent_products_stock() called at [/homepages/20/d503465712/htdocs/shops/ecs/admin/products_with_attributes_stock.php:425]
[16-Sep-2015 19:41:02 Europe/London] PHP Fatal error: 1146:Table 'db588038315.ecs_products_with_attributes_stock' doesn't exist :: select sum(quantity) as quantity, products_id from ecs_products_with_attributes_stock where products_id = 529 ==> (as called by) /homepages/20/d503465712/htdocs/shops/ecs/admin/includes/classes/products_with_attributes_stock.php on line 96 <== in /homepages/20/d503465712/htdocs/shops/ecs/includes/classes/db/mysql/query_factory.php on line 155
Quote:
[16-Sep-2015 19:40:58 Europe/London] #1 trigger_error() called at [/homepages/20/d503465712/htdocs/shops/ecs/includes/classes/db/mysql/query_factory.php:155]
#2 queryFactory->show_error() called at [/homepages/20/d503465712/htdocs/shops/ecs/includes/classes/db/mysql/query_factory.php:132]
#3 queryFactory->set_error() called at [/homepages/20/d503465712/htdocs/shops/ecs/includes/classes/db/mysql/query_factory.php:262]
#4 queryFactory->Execute() called at [/homepages/20/d503465712/htdocs/shops/ecs/admin/includes/classes/products_with_attributes_stock.php:284]
#5 products_with_attributes_stock->displayFilteredRows() called at [/homepages/20/d503465712/htdocs/shops/ecs/admin/products_with_attributes_stock.php:730]
[16-Sep-2015 19:40:58 Europe/London] PHP Fatal error: 1146:Table 'db588038315.ecs_products_with_attributes_stock' doesn't exist :: select * from ecs_products_with_attributes_stock where products_id="529"
order by sort ASC; ==> (as called by) /homepages/20/d503465712/htdocs/shops/ecs/admin/includes/classes/products_with_attributes_stock.php on line 284 <== in /homepages/20/d503465712/htdocs/shops/ecs/includes/classes/db/mysql/query_factory.php on line 155
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
No, what it means is that when the remove was performed, the code did everything it was programmed to do; however, there were three keys that had been added that were not incorporated into the remove process. Therefore, the keys remain in the database. Further, the install has not been written to allow such failures, but instead to provide an error like what you provided. As a result of the error, program execution of the installation stopped dead in its tracks and therefore, the table has not been recreated which is why this latest error is seen. So… Below is the code to incorporate into the removeDynDropdownsConfiguration function inside of admin/stock_by_attr_install.php (in SBA version 1.5.4 this is around line 113) I would suggest adding the code below (three sets of lines) after this line:
Code:
array_push($resultMmessage, '• Deleted STOCK_SET_SBA_NUMRECORDS ' . $msg);
The following three sets of lines need to be added into the function removeDynDropdownsConfiguration()
Code:
$sql = "DELETE IGNORE FROM `".TABLE_CONFIGURATION."` WHERE `configuration_key` = 'PRODINFO_ATTRIBUTE_DYNAMIC_STATUS'";
$db->Execute($sql);
if($db->error){
$msg = ' Error Message: ' . $db->error;
}
array_push($resultMmessage, '• Deleted PRODINFO_ATTRIBUTE_DYNAMIC_STATUS ' . $msg);
$sql = "DELETE IGNORE FROM `".TABLE_CONFIGURATION."` WHERE `configuration_key` = 'SBA_ZC_DEFAULT'";
$db->Execute($sql);
if($db->error){
$msg = ' Error Message: ' . $db->error;
}
array_push($resultMmessage, '• Deleted SBA_ZC_DEFAULT ' . $msg);
$sql = "DELETE IGNORE FROM `".TABLE_CONFIGURATION."` WHERE `configuration_key` = 'PRODINFO_ATTRIBUTE_POPUP_OUT_OF_STOCK'";
$db->Execute($sql);
if($db->error){
$msg = ' Error Message: ' . $db->error;
}
array_push($resultMmessage, '• Deleted PRODINFO_ATTRIBUTE_POPUP_OUT_OF_STOCK ' . $msg);
After adding this code, if you uninstall again and then reinstall, it should reinstall successfully… Otherwise, one could place the following code in the install SQL patches window found in the admin panel under tools:
Code:
DELETE IGNORE FROM `configuration` WHERE `configuration_key` = 'PRODINFO_ATTRIBUTE_DYNAMIC_STATUS';
DELETE IGNORE FROM `configuration` WHERE `configuration_key` = 'SBA_ZC_DEFAULT';
DELETE IGNORE FROM `configuration` WHERE `configuration_key` = 'PRODINFO_ATTRIBUTE_POPUP_OUT_OF_STOCK';
And then be able to install again; however, without the above additional code then a subsequent removal will result in the same condition again until the code can be updated on github.
-
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
FYI, the repository for SBA 1.5.4 (compatible with ZC 1.5.3 and ZC 1.5.4) has been updated with the above code. It will be a bit for SBA 1.5.3 to be updated to suit as there are possibly other improvements to incorporate and it is getting to the point where it seems that the two versions can to some extent be merged into a single package as the overlap with core/templated ZC files is relatively low and from there it is a lot easier to keep the software up-to-date for all applicable versions...