mc12345678 / Stock_By_Attributes_Combined

This combines the Files from SBA 1.5.3 and SBA 1.5.4 to provide a single distribution for updating applicable to ZC 1.5.0, 1.5.1, 1.5.3, 1.5.4, 1.5.5, 1.5.6, 1.5.7 and 1.5.8.
GNU General Public License v2.0
6 stars 8 forks source link

1.5.6a - #58

Open Anon3334 opened 5 years ago

Anon3334 commented 5 years ago

Hello,

In trying to get Stock by Attributes to work completely with a 1.5.6, I wanted to see if there will be a pure complete upload for 1.5.6 all in one place for upload. In a few cases the code that is removed/changed on Github does not reflect the current 1.5.6 code either because it was removed before the new released or mod removal (ie: my includes/functions/function_lookup does not reflect the same code removed/changed within the Github with no mods that adjusted the area)

Sorry if this is the wrong place I wanted to post this on Zen Cart forum but my user name has not been approved yet.

Some issues Im working around:

-Not sure if it should do this but out of stock attributes can be selected when "SBA Show Stock Level on Product Info Page" is set to false, but it does not allow checkout if the checkout/backorder option is turned off not sure if thats working as intended.

-Adversly Out of stock using SBA allows nothing to be selected at all in product info area when "SBA Show Stock Level on Product Info Page" is set to True. So if only size Small - color black shirt is out of stock and all the rest are available and have stock in SBA it will mark them all as "Out of Stock" disabling the product.

-Extra text showing up above checkout in the shopping cart area after updating from Github

My site is newer so its not impacting customers yet but thats why I wanted to take the time to drop a note. I think a pure 1.5.6a upload will likely fix my issues since I likely have code missing that should exist and code present that doesn't belong.

Thx in advance for all the work you do overall RM

mc12345678 commented 5 years ago

My apologies for missing this post. Not like I just missed it, but that it has been several months, which is actually unusual for me. I get notified (or expect to get notified) about issues initiated here, so should have an email that reflects the above discussion. I then work to answer/resolve it.

So let's try to address the issues somewhat one at a time as listed below:

  1. File placement to a Zen Cart 1.5.6 version (or any version for that matter).

  2. Configuration settings, what they mean and are expected to do.

  3. What appears to be stock management to ensure appropriate selections and product are available.

  4. Some amount of additional text for which I would need to know more about to identify if it is something wrong with the github code or incorporation of that code.

  5. The direction of this plugin like some (not all) others has been to provide the base files that make up the background operation of the program and to then identify for each supported Zen Cart version what files need to be modified to support operation within that Zen Cart version. This offers two aspects: For new users of Zen Cart, they receive a fresh copy of the SBA code and depending on what other modifications have been made thus far, a few changes necessary for the code to work in their version of Zen Cart. For users that are transitioning from one version to another (upgrade hopefully), there are two aspects to that as well, the file(s) may have changed between those two versions, but the inserted SBA code is expected to be the same (unless I missed a revision of information) as far back as the Zen Cart software supports the operation also, one is able to compare the presence of a file between one version and the next to see if previous changes are still necessary. (In this case for example, includes/functions/functions_lookups.php no longer needs to be modified in Zen Cart 1.5.6 because other notifiers were added to that file.)

Another aspect of this is that the recommended method of upgrading is to literally rebuild the store starting with the core code and adding/merging in changes necessary to regain the desired look and operation including comparing/modifying any template related file to ensure it contains the base operational code and whatever changes are necessary for the template. If that process is followed, then again the plugin file(s) provided for a Zen Cart version should relatively match the new store. Yes, there was a brief period where the files I had for Zen Cart 1.5.6 had not incorporated any of the layout changes that have made it to the final version. Those changes surprised me as much as anyone I think, but a reasonable version of the final file(s) were incorporated. Again the changes are noted within the file and those are what are important.

  1. The setting for 'SBA Show Stock Level on Product Info Page' is intended to support each attribute having the information of how many of a selection are available. The information is for the most part already there in the code, but it is whether it should be displayed to the user or not. Depending on attribute configuration, the associated quantity may be stored in the page as javascript or merely attached to the dropdown's text. Further, depending on the attribute configuration, there may be javascript that is precluding selection and/or simple html code. There also are two parts to the stock quantities that make a difference/have an impact (see 3 below).

To assist in the issue of selection availability, a fair amount of information is needed, though it is all pretty much available in 2 or 3 locations. Essentially the settings for configuration->Stock, configuration->Dynamic Dropdowns, and a representative view/description of the variants assigned to the product. With all of that information, I am able to identify what is causing the issue and would likely be able to reproduce it to further explain why or provide some sort of information.

As to what is permitted along the purchase path, there is possibly something amiss with the add-to-cart aspect of not showing stock on the product information page, the above information (if still available) would help address that. Until then, there seems to be too many different paths to randomly investigate for this possibility. (Relevant) Information helps, generally, the more, the better.

  1. While it is possible to modify a few lines of code, generally speaking, stock is determined by two parts: the total quantity of an object and the quantity of variants. If a store does not allow "overselling", then if the total quantity of a product or a variant reaches 0, then the variant becomes disabled. If the variant has quantity, but the product does not? Then all variants will become disabled (except possibly those that have been excluded from being counted for stock quantities and... let's just say that one has to work really hard to make it an issue.)

  2. Could you please identify what additional text was seen? What template is/was being used? Is it a modified version of either of the two templates provided with the Zen Cart software, or is it a third party's template?

Just to wrap up, my suggestion would be in a way to use the file set from the previous Zen Cart version folder to remove the SBA code from your store, then to use the folder for your current Zen Cart version to merge in whatever, if any changes are needed for 1.5.6. As versions have gone, there are less and less files that need touching so the number of core files to compare should be very few, while the template files have not changed significantly though some things also have been removed from some of the template like files.

Anon3334 commented 5 years ago

Thanks man, Ive been traveling and working on other things this was a lot of info but now I will sit and look through it.

(also had to get the test site up and working so I can break things)

I'll read through and try to respond as well as go back to the Github for all I know you may have made updates

Talk to you again soon

RM

On Mon, Jun 17, 2019 at 1:18 PM mc12345678 notifications@github.com wrote:

My apologies for missing this post. Not like I just missed it, but that it has been several months, which is actually unusual for me. I get notified (or expect to get notified) about issues initiated here, so should have an email that reflects the above discussion. I then work to answer/resolve it.

So let's try to address the issues somewhat one at a time as listed below:

1.

File placement to a Zen Cart 1.5.6 version (or any version for that matter). 2.

Configuration settings, what they mean and are expected to do. 3.

What appears to be stock management to ensure appropriate selections and product are available. 4.

Some amount of additional text for which I would need to know more about to identify if it is something wrong with the github code or incorporation of that code. 5.

The direction of this plugin like some (not all) others has been to provide the base files that make up the background operation of the program and to then identify for each supported Zen Cart version what files need to be modified to support operation within that Zen Cart version. This offers two aspects: For new users of Zen Cart, they receive a fresh copy of the SBA code and depending on what other modifications have been made thus far, a few changes necessary for the code to work in their version of Zen Cart. For users that are transitioning from one version to another (upgrade hopefully), there are two aspects to that as well, the file(s) may have changed between those two versions, but the inserted SBA code is expected to be the same (unless I missed a revision of information) as far back as the Zen Cart software supports the operation also, one is able to compare the presence of a file between one version and the next to see if previous changes are still necessary. (In this case for example, includes/functions/functions_lookups.php no longer needs to be modified in Zen Cart 1.5.6 because other notifiers were added to that file.)

Another aspect of this is that the recommended method of upgrading is to literally rebuild the store starting with the core code and adding/merging in changes necessary to regain the desired look and operation including comparing/modifying any template related file to ensure it contains the base operational code and whatever changes are necessary for the template. If that process is followed, then again the plugin file(s) provided for a Zen Cart version should relatively match the new store. Yes, there was a brief period where the files I had for Zen Cart 1.5.6 had not incorporated any of the layout changes that have made it to the final version. Those changes surprised me as much as anyone I think, but a reasonable version of the final file(s) were incorporated. Again the changes are noted within the file and those are what are important.

  1. The setting for 'SBA Show Stock Level on Product Info Page' is intended to support each attribute having the information of how many of a selection are available. The information is for the most part already there in the code, but it is whether it should be displayed to the user or not. Depending on attribute configuration, the associated quantity may be stored in the page as javascript or merely attached to the dropdown's text. Further, depending on the attribute configuration, there may be javascript that is precluding selection and/or simple html code. There also are two parts to the stock quantities that make a difference/have an impact (see 3 below).

To assist in the issue of selection availability, a fair amount of information is needed, though it is all pretty much available in 2 or 3 locations. Essentially the settings for configuration->Stock, configuration->Dynamic Dropdowns, and a representative view/description of the variants assigned to the product. With all of that information, I am able to identify what is causing the issue and would likely be able to reproduce it to further explain why or provide some sort of information.

As to what is permitted along the purchase path, there is possibly something amiss with the add-to-cart aspect of not showing stock on the product information page, the above information (if still available) would help address that. Until then, there seems to be too many different paths to randomly investigate for this possibility. (Relevant) Information helps, generally, the more, the better.

1.

While it is possible to modify a few lines of code, generally speaking, stock is determined by two parts: the total quantity of an object and the quantity of variants. If a store does not allow "overselling", then if the total quantity of a product or a variant reaches 0, then the variant becomes disabled. If the variant has quantity, but the product does not? Then all variants will become disabled (except possibly those that have been excluded from being counted for stock quantities and... let's just say that one has to work really hard to make it an issue.) 2.

Could you please identify what additional text was seen? What template is/was being used? Is it a modified version of either of the two templates provided with the Zen Cart software, or is it a third party's template?

Just to wrap up, my suggestion would be in a way to use the file set from the previous Zen Cart version folder to remove the SBA code from your store, then to use the folder for your current Zen Cart version to merge in whatever, if any changes are needed for 1.5.6. As versions have gone, there are less and less files that need touching so the number of core files to compare should be very few, while the template files have not changed significantly though some things also have been removed from some of the template like files.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mc12345678/Stock_By_Attributes_Combined/issues/58?email_source=notifications&email_token=ALTX2JEOKAGEUWRIG52XWRDP27BMVA5CNFSM4G7RYTMKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODX33OUY#issuecomment-502773587, or mute the thread https://github.com/notifications/unsubscribe-auth/ALTX2JCMAKDOWZ4WXVW2METP27BMVANCNFSM4G7RYTMA .

Anon3334 commented 5 years ago

---------- Forwarded message --------- Date: Thu, Aug 29, 2019 at 10:14 AM Subject:

  1. The setting for 'SBA Show Stock Level on Product Info Page' is intended to support each attribute having the information of how many of a selection are available. The information is for the most part already there in the code, but it is whether it should be displayed to the user or not. Depending on attribute configuration, the associated quantity may be stored in the page as javascript or merely attached to the dropdown's text. Further, depending on the attribute configuration, there may be javascript that is precluding selection and/or simple html code. There also are two parts to the stock quantities that make a difference/have an impact (see 3 below).

(For the sake of saying so, I don’t want to show stock level on my Product info so that “should” be turned off so if you something else to contrary you’ll already know this isn’t an option I want to use )

To assist in the issue of selection availability, a fair amount of information is needed, though it is all pretty much available in 2 or 3 locations. Essentially the settings for configuration->Stock, configuration->Dynamic Dropdowns, and a representative view/description of the variants assigned to the product. With all of that information, I am able to identify what is causing the issue and would likely be able to reproduce it to further explain why or provide some sort of information.

( Here are my configuration settings)

I don’t have Dynamic DropDowns in configuration but I included what I have that is “dynamic” from Configuration

This is what I saw that was “Dynamic”

Example of a product test is below

(***)

As to what is permitted along the purchase path, there is possibly something amiss with the add-to-cart aspect of not showing stock on the product information page, the above information (if still available) would help address that. Until then, there seems to be too many different paths to randomly investigate for this possibility. (Relevant) Information helps, generally, the more, the better.

  1. While it is possible to modify a few lines of code, generally speaking, stock is determined by two parts: the total quantity of an object and the quantity of variants. If a store does not allow "overselling", then if the total quantity of a product or a variant reaches 0, then the variant becomes disabled. If the variant has quantity, but the product does not? Then all variants will become disabled (except possibly those that have been excluded from being counted for stock quantities and... let's just say that one has to work really hard to make it an issue.)

(I will test this out - it appears the variant ”does not become disabled on the product page” but stops the seller at the shopping cart)

Also During testing I noticed in SBA it wouldn’t let me set a stock variant to 0 not sure if that is intended or not but it would be good if it could since at times it could be a drop shipped product and you may want to manually adjust a size/color combination to 0

But instead to test this out I set it to 1 and then just used this one attribute to bring it to 0 while testing an update at the shopping cart level

You can see the primary product has quantity overall the attribute is set to 1 when going to use up this one last item and then attempting to order it again this is what happens

It does tell me there is not enough stock if I try to order 2 of them in the shopping cart so that seems to be working ok until-

I try to put it BACK to quantity of 1, then it will not work:

When I delete the product and start all over it lets me continue with the 1 product note it DOES NOT* include the Custom ID anywhere (BLU-S)

So after using this product I will now go back to the option again because now it has 0 stock for this item in size SMALL, color BLUE

When I go to the product page this is what happens:

It allows the selection – BUT, it does stop me at the shopping cart

So I guess my question is, Is it working as intended or should it stop the shopping on the product page? The variant of Small/Blue was available to select and again remember to note it is not applying the custom ID anywhere it also isn’t present on the confirmation.

(**)

  1. Could you please identify what additional text was seen? What template is/was being used? Is it a modified version of either of the two templates provided with the Zen Cart software, or is it a third party's template?

(Definitely a third party template, called MARCUS I copy and pasted a example of the text I see, see where it says “COLOR-Black, its placing the option chosen for the item in an additional area)

And that’s all, its probably something simple, Im not entirely live yet so I can always turn it on for you to play with it we just have to coordinate a day and time.

Thanks again!

RM

Anon3334 commented 5 years ago

I sent this through Gmail I apologize if you can't see the actual pictures but I can forward you the gmail if you need it.

mc12345678 commented 5 years ago

The majority of the features/issues described appear to be a result of not fully installing the software. At the same time, and I still don't understand the cause, I have found it possible to actually miss the configuration menu option Dynamic Dropdowns. I mean it can be there and for some reason or another as one goes line item by line item, it is just skipped over in viewing. Then there is the designation of attribute options to use the added 'SBA Select List (Dropdown) Basic' option name type. Use of that type offers additional information control that the standard dropdown does not offer.

The installation script offers an automatic assignment of that dropdown type to product tracked by the plugin and can be reached from YOUR_ADMIN/stock_by_attr_install.php.

By use of Dynamic Dropdowns and/or the SBA Select List (Dropdown) Basic option, available selections are enabled/disabled as appropriate. Dynamic Dropdowns supports multiple attribute type product while the modified dropdown option supports primarily single type attribute product. Each of these will prevent selection of an out-of-stock variant from the product page. If the item makes it to the cart, then the cart still will protect as well as a check done during the final stages of the checkout.

The problem with entering a 0 for quantity, at which screen is that occurring? I did have problem some time ago with entering a zero at one of the fields, but there is the initial population field and then should be able to also click on the quantity when looking at the variant list and update the quantity there as well. I thought I had fixed that zero entry problem, but perhaps not for all places.

As for the missing Custom ID information, that is also something that is typically handled by those extra features/options, it should also be possible to assign the custom ID as the model number in other displays.

Hope that helps a little. May want to also see if issue #57 or perhaps any of the other issues where installation is described have anything of value.