Forums / All Other Contributions/Addons / Stock by Attribute v4.0 addon for v1.3.5-1.3.9

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

Views: 660,386

Results 3,261 to 3,280 of 3,609
12 Jun 2020, 12:33 AM
#3261
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

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

gohealth:

Hi, I'm looking at my options here for this type of functionality. I note the age of this post (2006), as well as the latest updates to SbA add-on being in 2014. Has this functionality been integrated into Zen Cart 1.5.6c? If not, is there a road-map as to what version (noting ZC 1.5.7 is just around the corner?).

appreciate any thoughts on this.

Thanks,
Chris
Ummmm... Great that looking wayyyyyyyyy back at posts on this thread... Wondering, have any of the more recent posts been reviewed (excluding the last 3 posts as there are plenty of others before that which were successful)? At least to identify the operability with ZC 1.5.6c?

I can't speak to ZC team incorporating with core code, but I am seeing that there are ever more possible ways to incorporate it without touching core files... In fact with ZC 1.5.7 it will be possible to incorporate without any modifications (or overrides) to includes/modules/attributes.php.

As to a "flaw" in the database structure? I agree, though it does seem like it is becoming "easier" to be able to transition to a more appropriate database structure because the code is becoming more "compartmentalized". There are two "major" portions to address/overcome. The customer front end display of the attribute selections (needs to be more javascript related and less "hard-coded") and then the admin facility actually needs more information displayed to better understand what variations exist.

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

12 Jun 2020, 10:55 AM
#3262
gohealth avatar

gohealth

New Zenner

Join Date:
Nov 2011
Location:
Brisbane, Australia
Posts:
35
Plugin Contributions:
0

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

mc12345678:

Ummmm... Great that looking wayyyyyyyyy back at posts on this thread... Wondering, have any of the more recent posts been reviewed (excluding the last 3 posts as there are plenty of others before that which were successful)? At least to identify the operability with ZC 1.5.6c?

I can't speak to ZC team incorporating with core code, but I am seeing that there are ever more possible ways to incorporate it without touching core files... In fact with ZC 1.5.7 it will be possible to incorporate without any modifications (or overrides) to includes/modules/attributes.php.
Ok, a fair comment if I was looking for the compatibility of this module. That was not my question. My purpose to going wayyyyyy back was to ascertain if the ZC team had incorporated any of this functionality as standard, even the very basic function at some point prior. Noting that, a lot of the add-ons and extensions provide similar functionality to standard (some gets pulled in at some point). So, it could very well be that ZC 1.5.6c (1.5.7 or 1.5.8 or earlier!) does cater for a similar feature, just not as rich as this module. Hope that clarifies why trolling through 3000 entries was really not getting anywhere. Also, there are a fair few forums related to this add-on, with the heading of this one being quite confusing really as "THE" forum for version SbA 4.7 on Zen Cart 1.5.x.

Thanks for the feedback.

Chris

12 Jun 2020, 7:00 PM
#3263
sungmo avatar

sungmo

New Zenner

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

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

"All - Attributes - Combo" does not work.

Please see below link. if you want to see my dashboard i can give you the information.

https://youtu.be/VR2qYc1HlFU

please let me know how to solve this problem?

13 Jun 2020, 3:27 AM
#3264
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

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

sungmo:

"All - Attributes - Combo" does not work.

Please see below link. if you want to see my dashboard i can give you the information.

https://youtu.be/VR2qYc1HlFU

please let me know how to solve this problem?
As I said before, I saw the video but had been unable to recreate the problem.

I certainly can take a look at the files (via FTP) and as permitted access to the admin screen to at least reach the SBA menu. Credentials can be sent via PM as necessary.

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

13 Jun 2020, 6:27 AM
#3265
sungmo avatar

sungmo

New Zenner

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

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

mc12345678:

As I said before, I saw the video but had been unable to recreate the problem.

I certainly can take a look at the files (via FTP) and as permitted access to the admin screen to at least reach the SBA menu. Credentials can be sent via PM as necessary.

I sent you all information to access admin and FTP

Thanks...

15 Jun 2020, 2:45 AM
#3266
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

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

sungmo:

"All - Attributes - Combo" does not work.##

Please see below link. if you want to see my dashboard i can give you the information.

https://youtu.be/VR2qYc1HlFU

please let me know how to solve this problem?

From the looks of it, the database had an issue that helped to chase down a possible issue and provide a resolution.

So, in the admin, when a combination was found to try to attach to the pwas table, but the combination is not possible then it is/was to remove that group(ing). In this database there were two languages at some point added and attributes used, but then the languages were removed and some remnant remained. (install/removal is assumed)

The fix was to force determination of the number of records returned from one query instead of identifying that at the end of the file (caching issue?), and the other was to do an early return when it is determined that there are no results as compared to finding a sort of blank set of results.##

What was happening was that with the extra database information, upon the request to create the combinations, all of the available/associated combinations were being created and they were being displayed (seems that the cache may have supported proving that the combinations were correct). Then when the screen was updated/listings made to be displayed, the queries involved caused the function to return an empty set of data instead of populating an array. Then because it was empty, the logic was to remove that combination of items because something happened to the source data to negate the allowance of that combination and therefore the variant is/was to be removed.##

In a way, the issue was "planned" to occur, though not so abruptly. It was expected that the queries wouldn't result in a EOF condition immediately after Execute where there are/were records in the query. Unfortunately (geekspeak) a RecordCount requires operations be executed as compared to EOF which returns the current/last variable condition.

Anyways, I've applied the change to the master branch. It doesn't "fix" the database problem and doesn't notify of it either, but it does allow the program to operate and not be seen as the problem causer. It just rolls along with the problem. :)

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

5 Jul 2020, 11:33 AM
#3267
bennito avatar

bennito

New Zenner

Join Date:
Jan 2016
Location:
Denmark, Copenhagen
Posts:
39
Plugin Contributions:
0

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

ZenCart 1.5.4

Hi everyone,

Does somebody can tell me why I can't see or modify the quantity of a product when there are different attributes. I simply do not see any options for that. I have updated everything according to the instructions, checked if a file is missing, but no errors have been found.

Attachment 19072
Attachment 19073

5 Jul 2020, 3:12 PM
#3268
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

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

bennito:

ZenCart 1.5.4

Hi everyone,

Does somebody can tell me why I can't see or modify the quantity of a product when there are different attributes. I simply do not see any options for that. I have updated everything according to the instructions, checked if a file is missing, but no errors have been found.

Attachment 19072
Attachment 19073

The screen shown second below is where there should be more information displayed to allow controlling attribute quantities; however, this appears to be a partial white screen. To identify what the problem is, would recommend reviewing this help document on that subject: https://docs.zen-cart.com/user/troubleshooting/blank_page/

There should be a debug file that identifies the issue. Also, what was the source of the files used to install and when was it downloaded? There have been some improvements for systems that run strict operations.

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

5 Jul 2020, 8:32 PM
#3269
bennito avatar

bennito

New Zenner

Join Date:
Jan 2016
Location:
Denmark, Copenhagen
Posts:
39
Plugin Contributions:
0

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

mc12345678:

The screen shown second below is where there should be more information displayed to allow controlling attribute quantities; however, this appears to be a partial white screen. To identify what the problem is, would recommend reviewing this help document on that subject: https://docs.zen-cart.com/user/troubleshooting/blank_page/

There should be a debug file that identifies the issue. Also, what was the source of the files used to install and when was it downloaded? There have been some improvements for systems that run strict operations.

Hi, I have re-installed the add-on. The files has been downloaded from GitHUb. https://github.com/mc12345678/Stock_By_Attributes_Combined

The log shows the following:

[05-Jul-2020 23:26:10 Europe/Sofia] PHP Fatal error: Call to undefined function zen_draw_label() in /home/nyvinhus/public_html/bennito/products_with_attributes_stock.php on line 1217

On the file "Product_with_attributes_stock.php" line 1217 says:

echo zen_draw_label(PWA_TEXT_SEARCH, 'search', '');

As I am really not expert on what means that, maybe you could give me some hint where and what to do?:(:(:(

5 Jul 2020, 9:16 PM
#3270
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

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

bennito:

Hi, I have re-installed the add-on. The files has been downloaded from GitHUb. https://github.com/mc12345678/Stock_By_Attributes_Combined

The log shows the following:

[05-Jul-2020 23:26:10 Europe/Sofia] PHP Fatal error: Call to undefined function zen_draw_label() in /home/XXxxxx/public_html/admin/products_with_attributes_stock.php on line 1217

On the file "Product_with_attributes_stock.php" line 1217 says:

echo zen_draw_label(PWA_TEXT_SEARCH, 'search', '');

As I am really not expert on what means that, maybe you could give me some hint where and what to do?:(:(:(
It'll be best if I create a small change.

Back in February of this year, I went through that admin screen and in places I "upgraded" the code to use ZC available code. Unfortunately, the function zen_draw_label wasn't introduced until ZC 1.5.5. I know that I had previously reviewed the code to possibly use ZC functions but either it didn't exist then or I had decided not to incorporate certain functions because they were "new".

Anyways, I will add the function to the code such that if it doesn't exist in the ZC software then it will for this operation... Ideally, would upgrade ZC versions.

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

5 Jul 2020, 11:36 PM
#3271
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

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

mc12345678:

It'll be best if I create a small change.

Back in February of this year, I went through that admin screen and in places I "upgraded" the code to use ZC available code. Unfortunately, the function zen_draw_label wasn't introduced until ZC 1.5.5. I know that I had previously reviewed the code to possibly use ZC functions but either it didn't exist then or I had decided not to incorporate certain functions because they were "new".

Anyways, I will add the function to the code such that if it doesn't exist in the ZC software then it will for this operation... Ideally, would upgrade ZC versions.
I've added code to the file that was reporting the issue on github... I'm continuing to work a change to simplify the incorporation with ZC 1.5.7 (won't need to override the includes/modules/attributes.php file), just trying to make sure I have all conditions considered and then also incorporating the new method of using observers.

The specific commit that further supports this plugin on systems pre ZC 1.5.5 until further issue is identified is: https://github.com/mc12345678/Stock_By_Attributes_Combined/commit/3a37d9105031af5b22179684264a45c95d733a6a

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

13 Jul 2020, 6:42 PM
#3272
bennito avatar

bennito

New Zenner

Join Date:
Jan 2016
Location:
Denmark, Copenhagen
Posts:
39
Plugin Contributions:
0

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

mc12345678:

I've added code to the file that was reporting the issue on github... I'm continuing to work a change to simplify the incorporation with ZC 1.5.7 (won't need to override the includes/modules/attributes.php file), just trying to make sure I have all conditions considered and then also incorporating the new method of using observers.

The specific commit that further supports this plugin on systems pre ZC 1.5.5 until further issue is identified is: https://github.com/mc12345678/Stock_By_Attributes_Combined/commit/3a37d9105031af5b22179684264a45c95d733a6a

Hi again,

Thank you for your prompt actions! I am sorry that I did not replied to your last post. I am having really terrible week. This weekend I hope I have time and will implement this new line and check if everything works and I will return to you with a feedback.

Thank you once again!

13 Jul 2020, 7:30 PM
#3273
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

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

bennito:

Hi again,

Thank you for your prompt actions! I am sorry that I did not replied to your last post. I am having really terrible week. This weekend I hope I have time and will implement this new line and check if everything works and I will return to you with a feedback.

Thank you once again!

No problem, please take care of the things that need to be. This stuff will be here.

I did also recreate the issue to make sure that the code insertion point would allow continued operation. Like said, I should have left myself some better code notes so that I could have prevented the problem(s) caused by simplifying the code.

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

18 Jul 2020, 5:09 PM
#3274
jodean avatar

jodean

Totally Zenned

Join Date:
May 2011
Location:
Tennessee
Posts:
511
Plugin Contributions:
0

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

I am trying to upgate my v1.5.7 version with the current Stock_By_Attributes-master from GitHIb

Copied Stock_By_Attributes_combined-master/1_5_6/admin/orders.php to my v1.5.7 version and the order.php runs. But it is missing v1.5.7 features such as the products ordered link on the order.php page.
Size 71,075
Runs without an error

Copied the orders.php from zen-cart v-1.5.7-06232020/admin/orders.php
Size 87,115
Original v1.5.7 Download
Runs without an error and displays the order product the products ordered link displayed

Here is what i tried:

Merged the two files above orders.php
Size now 89,283
orders.php just displays a white background page

No error log created

The same problem exists with the attributes_controller.php

18 Jul 2020, 9:32 PM
#3275
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

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

Just uploaded all of the "merge" files for ZC 1.5.7, as well as made changes in the catalog side observer class to handle using the ZC 1.5.7 provided includes/modules/attributes.php while the observe file still works with the previously provided attributes file... This means that the code provided in the combined package should continue to work with earlier ZC versions. Note this also means that in the base set of files, the attributes.php file is no longer provided as it comes as a part of one's default ZC installation of version 1.5.7. For previous ZC versions, the attributes.php file is included in each of the associated ZC version folders.

Still have some other "patches" to apply for the admin window, but checking the master branch should reflect software that should work in any 1.5.x provided distribution.

Note that for ZC 1.5.7 that there is an issue with the originally provided includes/modules/attributes.php file for standard product that are shown as a dropdown and have a default other than the first selectable item. In that situation and until an alternate method is applied, if something other than the first item is set as the default then that item will not appear as the default. This has been reported as an issue in github: https://github.com/zencart/zencart/issues/3734, proposed solution(s) are provided at: https://github.com/zencart/zencart/pull/3738.

Note that there have been a few different proposals made within that pull request. DrByte is aware of the issue but is also trying to consider a best way forwards.

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

27 Jul 2020, 4:25 PM
#3276
jodean avatar

jodean

Totally Zenned

Join Date:
May 2011
Location:
Tennessee
Posts:
511
Plugin Contributions:
0

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

I am looking for a process to post physical inventory with the Stock_By_Attributes without entering each attribute quantity manually in the SBA screen.

27 Jul 2020, 4:48 PM
#3277
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

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

jodean:

I am looking for a process to post physical inventory with the Stock_By_Attributes without entering each attribute quantity manually in the SBA screen.
Somewhat of two options available, for the product that have a single option name (any number of option values), the export/import option of the SBA admin under configuration menu works. If there are more than one option name, then EasyPopulate 4.0 supports populating data for existing variants. It does not yet support generating new variants from EP4.

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

1 Aug 2020, 1:02 PM
#3278
frumious avatar

frumious

New Zenner

Join Date:
Jun 2020
Location:
Scotland
Posts:
11
Plugin Contributions:
0

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

SBA Version 1.5.4 for Zen Cart Version 1.5.6c

Have some issues with this and cant work out what's going on.
Please see pics below

Pic no1 shows the SBA page for an item on my site. The quantities on this page are correct.
pic no2 shows the option dropdown for the product on the website. As you can see these options are NOT correct according to the SBA page...
pic nos 3 and 4 display same pics for a different product. Again the stock on the SBA page are correct but the options drop down on the product page are wrong as well...
Have same issue with some of the other products in this category too, though not all of them...

ANY IDEAS ???

Attachment 19111
Attachment 19112
Attachment 19113
Attachment 19114

2 Aug 2020, 4:25 AM
#3279
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

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

Took a moment to identify the presence/absence of all of the images. For those that are unable to see the pictures for whatever reason, please at least allow me to describe two of them as the other two tell the same story.

In the first image, we are shown the admin screen portion of SBA for the given product where there are three rows of data showing quantity for each of three different option value selections within a single option name. The quantity of stock is different for each of the three option values which is also different than the total quantity of stock marked as available for the product stock quantity. In a second image, we are shown the catalog side of the store showing the product information page with all of the attributes assigned to the product and the stock quantity identified to each attribute (option value off of the one option name).

In this second image though there are more than three selections displayed. Here there are 10 or more selections displayed. The quantity of stock entered for the firs three shown in the admin match, but the other 7+ displayed options all appear to have the quantity that the overall product has...

This is a feature of SBA... it may not be usable in some stores, it may cause complete confusion in others, but it is part of the design. The concept is this: to limit the sale of quantity of product, one must identify the quantity of product that is available. By not defining the individual quantity, the quantity available is that defined by the product.

Thus, to remove the availability of the other option values, either the option values should be removed from the product or the quantity available for each of the option values should be identified even if it is a quantity of zero.

Of course, even with a quantity of zero, there comes the question of whether the "product" should be displayed. If the answer is no, I ask the question of why the option value remains assigned? If the answer is yes, I suggest reviewing the out-of-stock options to be sure that they "one day" will be returned to stock.

Sorry for the delay in responding, it's been a long day, but from the design perspective what you are seeing is "correct"... it may not fit your store or desired expectation but is functioning as designed/expected.

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

9 Aug 2020, 12:41 AM
#3280
jimmie avatar

jimmie

Totally Zenned

Join Date:
Jan 2013
Location:
New Port Richey, Florida
Posts:
971
Plugin Contributions:
0

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

how to add customid to advanced search result
jimmie