Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / Community Contributed Add-Ons / All Other Contributions/Addons / "Stock by Attributes" (version 1.5.3). This MOD is ONLY for v1.5.1 ..whaddda?

"Stock by Attributes" (version 1.5.3). This MOD is ONLY for v1.5.1 ..whaddda?

6 Oct 2014, 5:02 AM
#1
oavs avatar

oavs

Totally Zenned

Join Date:
Jan 2006
Location:
Downunder - QLD - Gold Coast
Posts:
921
Plugin Contributions:
0

Post #1 by oavs

Does anyone know if there is a "Stock by Attributes" version that actually works with Zenvcart 1.5.3 ?

Curiously why zen developers have created an attribute except NOT included the important aspect of the product attributes (see below)?

Why can't we do this?

Item code=test01 Item attribute 'Large' / 'Red' = Qty = 10
Item code=test01 Item attribute 'Medium' / 'Red' = Qty = 5
Item code=test01 Item attribute 'Small' / 'Red' = Qty = 8

Downunder QLD

6 Oct 2014, 8:27 AM
#2
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Post #2 by rodg

oavs:

Does anyone know if there is a "Stock by Attributes" version that actually works with Zenvcart 1.5.3 ?

I've got the latest version running on at least one site using ZenCart V1.5.3 ... I don't recall having to do anything special to get it to work.

oavs:

Curiously why zen developers have created an attribute except NOT included the important aspect of the product attributes (see below)?

Why can't we do this?

Item code=test01 Item attribute 'Large' / 'Red' = Qty = 10
Item code=test01 Item attribute 'Medium' / 'Red' = Qty = 5
Item code=test01 Item attribute 'Small' / 'Red' = Qty = 8

It can't be done for the simple reason it hasn't been coded for it. Whether there is an actual reason for it is something that I can't answer, but I can say that doing this will probably have a huge hit on performance, and then there's the question of how far should this be taken?

For example, should it also cater for:

Item code=test01 Item attribute 'Large' / 'Red' / 'Blue Buttons' = Qty = 10
Item code=test01 Item attribute 'Medium' / 'Red' / 'Green Buttons' = Qty = 5
Item code=test01 Item attribute 'Small' / 'Red' / 'Black buttons' = Qty = 8

That's 27(?) variants of single product.

or perhaps....
Item code=test01 Item attribute 'Large' / 'Red' / 'Blue Buttons' / 'Green Stripes' = Qty = 10
Item code=test01 Item attribute 'Large' / 'Red' / 'Blue Buttons' / 'Yellow Stripes' = Qty = 10
etc, etc......

That's 256(?) variants of a single product...

Just something to think about..

Cheers
RodG

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.

6 Oct 2014, 8:33 PM
#3
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

Post #3 by twitchtoo

Yes, RodG has it right, the logic behind the entire product/attribute system is what is the problem. It needs to be developed from the ground up with a dynamic matrix instead of a static lookup loop. The loop is a killer on processing times.

Twitch.
https://www.twitchtoo.com Do you work for free? Please donate.
June 7.2026 - NOW AVAILABLE - Twitch Base8 - Obsidian

6 Oct 2014, 8:37 PM
#4
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,934
Plugin Contributions:
26

Post #4 by dbltoe

May he rest in peace, Conor was close.:sadwalk:

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

6 Oct 2014, 8:41 PM
#5
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

Post #5 by twitchtoo

dbltoe:

May he rest in peace, Conor was close.:sadwalk:

Ask me nicely and I'll rewrite it.

Twitch.
https://www.twitchtoo.com Do you work for free? Please donate.
June 7.2026 - NOW AVAILABLE - Twitch Base8 - Obsidian

6 Oct 2014, 9:44 PM
#6
oavs avatar

oavs

Totally Zenned

Join Date:
Jan 2006
Location:
Downunder - QLD - Gold Coast
Posts:
921
Plugin Contributions:
0

Post #6 by oavs

Oh yes, I can see your point RodG

On my version 1.5.3 did not work . After uploading all the files, I had white screen on the installation screen and none of the other pages worked either. All there was a white screen. So painfully replaced all the files. Hate it when plugin spreads it self all over the place.

Downunder QLD

18 Oct 2014, 2:25 PM
#7
izzysoup avatar

izzysoup

New Zenner

Join Date:
Sep 2013
Location:
in the clouds
Posts:
35
Plugin Contributions:
0

Post #7 by izzysoup

oavs:

Oh yes, I can see your point RodG

On my version 1.5.3 did not work . After uploading all the files, I had white screen on the installation screen and none of the other pages worked either. All there was a white screen. So painfully replaced all the files. Hate it when plugin spreads it self all over the place.

Oh my, I have spent two hours trying to find a solution to get 'stock by attributes' to work properly on 1.5.3. I see some core files have changed significantly from 1.5.1 to 1.5.3 which SBA relies on. I am fairly new to Zen Cart and indeed programming in general, I think my upgrade to 1.5.3 is on hold until I can get this modification to work or it is upgraded.

Does anyone know of an alternative to SBA? As almost all our products have stock by variation and as drop-shippers, we also need the facility to update these 'stocked attributes' via a csv upload.

Many thanks, Izzy :smile:

22 Oct 2014, 12:42 PM
#8
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Post #8 by rodg

izzysoup:

Oh my, I have spent two hours trying to find a solution to get 'stock by attributes' to work properly on 1.5.3. I see some core files have changed significantly from 1.5.1 to 1.5.3 which SBA relies on.

It is true that some of the core files have changed between V1.5.1 & V1.5.3 and that the SBA module relies on these files to function.
Now, although I had no problems with SBA working with ZenCart V1.5.3 I have to admit that I didn't use the modified core files from the SBA distribution. The reason being is that the site I installed it on already had other modifications needed by other addons, so this meant I needed to look at the changes to the code modified for SBA and make those same changes/additions to my already modified core files. IOW the original ZenCart V1.5.3 core files needed different modifications for two different add-ons.

Whilst doing this I'd noted that the SBA had less modifications needed than the other add-on - In fact the parts of the code it modified were quite clearly marked and easy to follow - So although I had an already modified code that needed these further modifications for SBA it was actually quite a simple thing to do.

I'm guessing that you had problems because you simply replaced the original zencart files with the SBA modified ones. I can certainly appreciate that this is generally the simplest and easiest route to take, it isn't the best route. If you need to depend on this replacement method it is only a matter of time before you'll end up installing yet another module that also changes these same files and you'll find it impossible to get all of the add-ons to play nicely together. It is for this reason I urge you to learn how to identify the changed needed by any given module so that you can merge the changes yourself if or when necessary.

I fully appreciate that you may be quite new to ZenCart and programming, and as such, I wouldn't normally be suggesting this to you. However, as stated, the changes needed for the SBA module are clearly marked in the pre-modified files that are supplied with the download zip, and even a relatively new Zenner with just a little coding experience probably won't have too much of a hard time doing a manual merge. Not all other modules make it quite this easy, and this makes using SBA as a near perfect setting to learn how to do the manual merges.

If you can't, or don't want to go this route I fully understand. I'm not trying to disparage you in any way. These kinds of edits and changes really aren't suited for everyone (and they don't need to be), BUT if you do wish or plan to increase your skill level in this regard I do encourage you to give it your best shot... I won't call this a 'baby step' - It is more like a jump... but a jump in the right direction IF ZenCart and programming are in you long term plans for the future. If you don't have long term plans for ZenCart development then please ignore all that I've said, as it isn't applicable to your plans or needs.

Cheers
RodG

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.

22 Oct 2014, 1:20 PM
#9
dw08gm avatar

dw08gm

Totally Zenned

Join Date:
Sep 2008
Location:
DownUnder, overlooking South Pole.
Posts:
1,026
Plugin Contributions:
2

Post #9 by dw08gm

twitchtoo:

Ask me nicely and I'll rewrite it.

It would be great if SBA could be optionalised for critical path or finite element analysis, since it is not always the final product that needs tracking but critical individual components that make up one or more products. For instance, Tshirts printed with pre-made transfers, such as iron-on transfers. It may not be the final printed Tshirt that needs to be tracked but the number of pre-made transfers of a particular design that can be applied to a Tshirt, in fact any garment or strata. If you only offered one style of Tshirt in four sizes and two colours, but had 50+ transfer designs, it is better to make the design of the transfer the product and make the Tshirt properties the attributes. But then what happens when the same transfer can be applied to other garments and/or strata. It is such a messy thing.

22 Oct 2014, 2:51 PM
#10
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

Post #10 by twitchtoo

dw08gm:

It would be great if SBA could be optionalised for critical path or finite element analysis, since it is not always the final product that needs tracking but critical individual components that make up one or more products. For instance, Tshirts printed with pre-made transfers, such as iron-on transfers. It may not be the final printed Tshirt that needs to be tracked but the number of pre-made transfers of a particular design that can be applied to a Tshirt, in fact any garment or strata. If you only offered one style of Tshirt in four sizes and two colours, but had 50+ transfer designs, it is better to make the design of the transfer the product and make the Tshirt properties the attributes. But then what happens when the same transfer can be applied to other garments and/or strata. It is such a messy thing.

I believe the biggest problem is the belief (currently supported by the old code) that attributes are treated differently than products. It's simply a relationship or connection between the product and the attribute that needs to be stored.

In that type of model all data would be recorded for products as it is for attributes, and therefore the type of reporting you're looking for would be a click away.

That too means the output loops wouldn't be constantly 'searching' through the attributes.

Some would then argue there would be a 'problem' managing the relational data. That's pretty easy too, build a static display that clearly displays the db content with simple management tools like single/group select, move, delete etc.

This type of 'static' matrix ensures that all components of the system always work. Product/Attribute management, Bulk import/export, Reporting etc.

It also would allow anyone with an existing cart to output their data, upgrade to the newest version of Zen Cart, install the new 'attributes' module and import their data.

Two elements are required to 'kick start' this, time and money. Time I have.

Twitch.
https://www.twitchtoo.com Do you work for free? Please donate.
June 7.2026 - NOW AVAILABLE - Twitch Base8 - Obsidian

23 Oct 2014, 1:02 AM
#11
mc12345678 avatar

mc12345678

Totally Zenned

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

Post #11 by mc12345678

izzysoup:

Oh my, I have spent two hours trying to find a solution to get 'stock by attributes' to work properly on 1.5.3. I see some core files have changed significantly from 1.5.1 to 1.5.3 which SBA relies on. I am fairly new to Zen Cart and indeed programming in general, I think my upgrade to 1.5.3 is on hold until I can get this modification to work or it is upgraded.

Does anyone know of an alternative to SBA? As almost all our products have stock by variation and as drop-shippers, we also need the facility to update these 'stocked attributes' via a csv upload.

Many thanks, Izzy :smile:

RodG:

It is true that some of the core files have changed between V1.5.1 & V1.5.3 and that the SBA module relies on these files to function.
Now, although I had no problems with SBA working with ZenCart V1.5.3 I have to admit that I didn't use the modified core files from the SBA distribution. The reason being is that the site I installed it on already had other modifications needed by other addons, so this meant I needed to look at the changes to the code modified for SBA and make those same changes/additions to my already modified core files. IOW the original ZenCart V1.5.3 core files needed different modifications for two different add-ons.

Whilst doing this I'd noted that the SBA had less modifications needed than the other add-on - In fact the parts of the code it modified were quite clearly marked and easy to follow - So although I had an already modified code that needed these further modifications for SBA it was actually quite a simple thing to do.

I'm guessing that you had problems because you simply replaced the original zencart files with the SBA modified ones. I can certainly appreciate that this is generally the simplest and easiest route to take, it isn't the best route. If you need to depend on this replacement method it is only a matter of time before you'll end up installing yet another module that also changes these same files and you'll find it impossible to get all of the add-ons to play nicely together. It is for this reason I urge you to learn how to identify the changed needed by any given module so that you can merge the changes yourself if or when necessary.

I fully appreciate that you may be quite new to ZenCart and programming, and as such, I wouldn't normally be suggesting this to you. However, as stated, the changes needed for the SBA module are clearly marked in the pre-modified files that are supplied with the download zip, and even a relatively new Zenner with just a little coding experience probably won't have too much of a hard time doing a manual merge. Not all other modules make it quite this easy, and this makes using SBA as a near perfect setting to learn how to do the manual merges.

If you can't, or don't want to go this route I fully understand. I'm not trying to disparage you in any way. These kinds of edits and changes really aren't suited for everyone (and they don't need to be), BUT if you do wish or plan to increase your skill level in this regard I do encourage you to give it your best shot... I won't call this a 'baby step' - It is more like a jump... but a jump in the right direction IF ZenCart and programming are in you long term plans for the future. If you don't have long term plans for ZenCart development then please ignore all that I've said, as it isn't applicable to your plans or needs.

Cheers
RodG

Fyi, there is a SBA version 1.5.4 that is supposed to be compatible with ZC version 1.5.3 with little to no modification to install on a clean setup of ZC 1.5.3. That said, Rod makes a very valid point regarding the approach of installation (of almost any "plugin"). I've been mostly focused on the 1.5.3 version of SBA so as not to get too scattered with the product. Just like Rod was saying, if the product works in one version and is well documented, then "activating" in another version comes much easier. Needs to work as desired/needed first. :)

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

24 Oct 2014, 1:36 PM
#12
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Post #12 by rodg

mc12345678:

Fyi, there is a SBA version 1.5.4 that is supposed to be compatible with ZC version 1.5.3

Where did you see this?

Cheers
RodG

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.

24 Oct 2014, 1:55 PM
#13
mc12345678 avatar

mc12345678

Totally Zenned

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

Post #13 by mc12345678

RodG:

Where did you see this?

Cheers
RodG

Github
https://github.com/potteryhouse
I don't remember the rest of the uri, but version 1.5.4 is designated as being compatible with ZC 1.5.3. I haven't run any type of a comparison of the two versions to identify if there are functional differences as well as expected compatibility differences.

It , like the "older" version is still a work in progress.

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

24 Oct 2014, 4:20 PM
#14
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Post #14 by rodg

mc12345678:

Github
https://github.com/potteryhouse
I don't remember the rest of the uri, but version 1.5.4 is designated as being compatible with ZC 1.5.3. I haven't run any type of a comparison of the two versions to identify if there are functional differences as well as expected compatibility differences.

It , like the "older" version is still a work in progress.

Got it.

Thanks.
RodG

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.

29 Oct 2014, 3:13 PM
#15
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Post #15 by divavocals

twitchtoo:

Ask me nicely and I'll rewrite it.

So if we ask, then you'll do???? OUTSTANDING...

Consider this me asking nicely..

What's the next step???

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

29 Oct 2014, 6:47 PM
#16
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Post #16 by divavocals

dbltoe:

May he rest in peace, Conor was close.:sadwalk:

He was.. BUT I happen to know from a very reliable source that a commercial SBA option that matches what Conor's would have offered in terms of functionality may be a coming soon..

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

27 Nov 2014, 2:29 PM
#17
izzysoup avatar

izzysoup

New Zenner

Join Date:
Sep 2013
Location:
in the clouds
Posts:
35
Plugin Contributions:
0

Post #17 by izzysoup

DivaVocals:

He was.. BUT I happen to know from a very reliable source that a commercial SBA option that matches what Conor's would have offered in terms of functionality may be a coming soon..
Is there an update on this?

27 Nov 2014, 8:22 PM
#18
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Post #18 by divavocals

izzysoup:

Is there an update on this?
An update??? Well the mod I spoke of is a commercial one..(meaning it's not free).. Forum rules prohibit me from posting details here.. PM me and I'll provide a link..

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

11 Feb 2015, 2:52 PM
#19
dgcdesign avatar

dgcdesign

New Zenner

Join Date:
Aug 2005
Posts:
26
Plugin Contributions:
0

Post #19 by dgcdesign

Does anybody have a working sample site using the Stock by Attributes with ZC 1.5? Please, I need to give an answer to my client ASAP about the possibility of what they want.

11 Feb 2015, 4:30 PM
#20
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Post #20 by divavocals

dgcdesign:

Does anybody have a working sample site using the Stock by Attributes with ZC 1.5? Please, I need to give an answer to my client ASAP about the possibility of what they want.

Not sure SBA for v1.5.4 is ready just yet....
Take a look at the commercial option I mentioned.. It's working NOW! (search google for "Products' Options' Stock Manager 1.5.3")

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.