Re: "Stock by Attributes" (version 1.5.3). This MOD is ONLY for Zen Cart 1.5.1 ..whad
Quote:
Originally Posted by
mattys
actually, deactivating dynamic drop down creates to many issues, so am reactivating, will investigate why javascript order not being displayed
matt
Figured out the why, now just need to implement a solution... Three schools of thought on resolution.
Issue is that the keys of the objects are numeric not text...
One solution is to incorporate a character into the keys and all references calling each object (stk, stk2, etc).
Second is to use an array that maintains the order.
Third is to basically create a storage class that offers operations to access the data and maintains the order...
The third appears to offer the most operational freedom but also the most javascript to the visitor. The first is probably easiest to implement but browsers may eventually sort on text keys as well resulting in the same result as seen above...
Re: "Stock by Attributes" (version 1.5.3). This MOD is ONLY for Zen Cart 1.5.1 ..whad
are the keys of the object the value, e.g. the '18' in <option value="18">Black </option>, is 18 the key? if so, how do add a character to the key? the key, or attribute value id, is automatically generated...
when you say array, you mean create php/javascript code - i am not a developer!, so, all refs to arrays are out!
it sounds like you are suggesting there is an issue with the software and it needs a hack to fix. I thought earlier you were suggesting it was an issue peculiar to my installation, as such i am a bit lost as to where to head with this
if you can clarify that would be great thanks
also, would you be available to do any paid work to get this sorted? (i think i may have asked this before and you politely said no, so, apologies if this is the case)
Matt
Re: "Stock by Attributes" (version 1.5.3). This MOD is ONLY for Zen Cart 1.5.1 ..whad
Quote:
Originally Posted by
mattys
are the keys of the object the value, e.g. the '18' in <option value="18">Black </option>, is 18 the key? if so, how do add a character to the key? the key, or attribute value id, is automatically generated...
when you say array, you mean create php/javascript code - i am not a developer!, so, all refs to arrays are out!
it sounds like you are suggesting there is an issue with the software and it needs a hack to fix. I thought earlier you were suggesting it was an issue peculiar to my installation, as such i am a bit lost as to where to head with this
if you can clarify that would be great thanks
also, would you be available to do any paid work to get this sorted? (i think i may have asked this before and you politely said no, so, apologies if this is the case)
Matt
Yes the key is the value that is presented as part of the option tag for example:
Code:
var stk={1:{370:1,18:1,367:1,272:1,21:1},2:{370:1,18:1,367:1,272:1,21:1},3:{370:1,18:1,367:1,272:1,21:1}};
There is a key of 1 that has sub objects, each having a key such as 370, 18, 367, 272, and 21. Each of those keys have a value associated with it. Because the setting for the site is such to not show the quantity of stock available a value of 1 is assigned to all items so that they at least appear in stock.
In order to maintain continuity of the plugin with ZC, the option value="370" needs to stay that way because those numbers are passed upon add to cart to downstream processing that I have no desire to change if not necessary. So the solution is to modify the above code to something like:
Code:
var stk={_1:{_370:1,_18:1,_367:1,_272:1,_21:1},2:{_370:1,_18:1,_367:1,_272:1,_21:1},_3:{_370:1,_18:1,_367:1,_272:1,_21:1}};
Where an underscore has been added to each of the "keys" thus forcing the object to treat _370 as a string rather than a number. From what I have seen this would be sufficient to maintain the order that is provided above, but a test would be needed across browsers to see that it holds true. Otherwise one of the other methods would need to be applied making the code control the situation rather than the expected operation (perceived expectation?) of browsers.
Yes, there is a problem with the javascript/code of the plugin and it needs to be updated/modified to support maintaining the sequence that was expected to be maintained and for which other great pains were taken to provide at least the above sequence... While close to correct, it's wrong and doesn't provide the intended result...
As to discussion of paid work, that is something expected to occur outside of the public forum... Please forgive me I vaguely remember a conversation, but not the details. Again, something for outside the public forum (PM, direct contact, carrier pigeon, etc...).
Re: "Stock by Attributes" (version 1.5.3). This MOD is ONLY for Zen Cart 1.5.1 ..whad
Quote:
Originally Posted by
mc12345678
Where an underscore has been added to each of the "keys" thus forcing the object to treat _370 as a string rather than a number.
How would one go about adding the underscore_?
Quote:
Originally Posted by
mc12345678
for which other great pains were taken to provide at least the above sequence
thanks for the work you have done on this, super quick response time too.
Re: "Stock by Attributes" (version 1.5.3). This MOD is ONLY for Zen Cart 1.5.1 ..whad
Quote:
Originally Posted by
mattys
How would one go about adding the underscore_?
thanks for the work you have done on this, super quick response time too.
Well, for the stk= portion that is buried in the Dynamic Dropdowns base class if I remember correctly, I may have overridden parts of it in the modified sba dropdown option... The other parts are in the sba dropdown class code such that when generating the javascript for say:
Code:
for (opt in stk[frm['id[1]'].value]) {
Would read like:
Code:
for (opt in stk["_"+frm['id[1]'].value]) {
I *think* that will work, but haven't tested it yet... It's just one thing I've seen as a way to concatenate two items (string with a value that is to be treated or type cast as a string eventually). It may need single quotes (') around the underscore or any single character as a possible requirement, a little "dabbling" to do. :)
Re: "Stock by Attributes" (version 1.5.3). This MOD is ONLY for Zen Cart 1.5.1 ..whad
Has anyone successfully used Stock by Attributes 1.5.3 with and Responsive Sheffield Blue V 2.0 ?
I gave it a try today on brand new vanilla Zen Cart 1.5.5-beta with only Responsive Sheffield Blue V 2.0. It broke the admin area--all I get is a blank page and the install script in the admin area also did not work - just gave me a blank screen.
I could really use these both together. Anybody have experience with this?
TIA
Re: "Stock by Attributes" (version 1.5.3). This MOD is ONLY for Zen Cart 1.5.1 ..whad
Is it possible to have horizontal tabs on the category pages (like you can on the product info pages)?
My products have a lot of technical info (like features, warranty, dimensions, colors, how to operate, etc) which is the same for each product model . It would be great if this information could be stored in tabs that expand when clicked, since there is so much to stuff to look through.
any suggestions would be appreciated.
tia
Re: "Stock by Attributes" (version 1.5.3). This MOD is ONLY for v1.5.1 ..whaddda?
Can the contents of the tabs (regardless of what page they are on) be "included" from a file, so that if/when the info has to be update, I only have to edit the included file? Also, this way, I can be sure that it is always the same on each place it is shown.
Any suggestions would be appreciated.
tia
Re: "Stock by Attributes" (version 1.5.3). This MOD is ONLY for Zen Cart 1.5.1 ..whad
Quote:
Originally Posted by
ibuttons
Has anyone successfully used Stock by Attributes 1.5.3 with and Responsive Sheffield Blue V 2.0 ?
I gave it a try today on brand new vanilla Zen Cart 1.5.5-beta with only Responsive Sheffield Blue V 2.0. It broke the admin area--all I get is a blank page and the install script in the admin area also did not work - just gave me a blank screen.
I could really use these both together. Anybody have experience with this?
TIA
First of all SBA 1.5.3 is for ZC 1.5.1... Not ZC 1.5.3 and above.. They have very different methods of communicating with the database and other interactions. Second, this particular thread was begun like many of the others after a conversation has continued at: https://www.zen-cart.com/showthread....r-v1-3-5-1-3-9
In that thread it has been identified that there is now a combined version of SBA that supports installation into each of the ZC versions 1.5.1, 1.5.3, 1.5.4, and a previous beta version of 1.5.5. It has yet not been tested/verified to be fully functional but has been merged with the applicable files. In fact there have been some improvements in ZC 1.5.5 that would remove the need to merge some if not most of the files that are otherwise modified for SBA to work with ZC. There does remain one or two functions that I can recall will still need to be overridden/merged because there is yet no notifiers or other overrides introduced into them.
So, the latest version of SBA originally begun by potteryhouse/jeking and described as part of this thread is being maintained at: https://github.com/mc12345678/Stock_...butes_Combined
Re: "Stock by Attributes" (version 1.5.3). This MOD is ONLY for Zen Cart 1.5.1 ..whad
Quote:
Originally Posted by
ibuttons
Is it possible to have horizontal tabs on the category pages (like you can on the product info pages)?
My products have a lot of technical info (like features, warranty, dimensions, colors, how to operate, etc) which is the same for each product model . It would be great if this information could be stored in tabs that expand when clicked, since there is so much to stuff to look through.
any suggestions would be appreciated.
tia
No reason not to, but I don't see how that is related to Stock By Attributes, perhaps yet on another thread?