Page 11 of 12 FirstFirst ... 9101112 LastLast
Results 101 to 110 of 119
  1. #101
    Join Date
    Jul 2012
    Posts
    16,799
    Plugin Contributions
    17

    Default Re: "Stock by Attributes" (version 1.5.3). This MOD is ONLY for Zen Cart 1.5.1 ..whad

    Quote Originally Posted by mattys View Post
    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...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  2. #102
    Join Date
    Sep 2006
    Location
    North Devon, England, UK
    Posts
    289
    Plugin Contributions
    0

    Default 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

  3. #103
    Join Date
    Jul 2012
    Posts
    16,799
    Plugin Contributions
    17

    Default Re: "Stock by Attributes" (version 1.5.3). This MOD is ONLY for Zen Cart 1.5.1 ..whad

    Quote Originally Posted by mattys View Post
    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...).
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  4. #104
    Join Date
    Sep 2006
    Location
    North Devon, England, UK
    Posts
    289
    Plugin Contributions
    0

    Default Re: "Stock by Attributes" (version 1.5.3). This MOD is ONLY for Zen Cart 1.5.1 ..whad

    Quote Originally Posted by mc12345678 View Post
    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 View Post
    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.

  5. #105
    Join Date
    Jul 2012
    Posts
    16,799
    Plugin Contributions
    17

    Default Re: "Stock by Attributes" (version 1.5.3). This MOD is ONLY for Zen Cart 1.5.1 ..whad

    Quote Originally Posted by mattys View Post
    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. :)
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  6. #106
    Join Date
    Nov 2008
    Posts
    51
    Plugin Contributions
    0

    Default 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

  7. #107
    Join Date
    Nov 2008
    Posts
    51
    Plugin Contributions
    0

    Default 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

  8. #108
    Join Date
    Nov 2008
    Posts
    51
    Plugin Contributions
    0

    Default 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

  9. #109
    Join Date
    Jul 2012
    Posts
    16,799
    Plugin Contributions
    17

    Default Re: "Stock by Attributes" (version 1.5.3). This MOD is ONLY for Zen Cart 1.5.1 ..whad

    Quote Originally Posted by ibuttons View Post
    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
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  10. #110
    Join Date
    Jul 2012
    Posts
    16,799
    Plugin Contributions
    17

    Default Re: "Stock by Attributes" (version 1.5.3). This MOD is ONLY for Zen Cart 1.5.1 ..whad

    Quote Originally Posted by ibuttons View Post
    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?
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

 

 
Page 11 of 12 FirstFirst ... 9101112 LastLast

Similar Threads

  1. v151 USPS module version for RateV4, Zen Cart 1.5? / "Online Rate" vs. "Post Office Price"
    By CarolineBogart in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 10 Dec 2012, 03:36 AM
  2. Comment out "Check for Updates" Button, "Support Site" Link, & "Version" Link?
    By g00glethis1 in forum Customization from the Admin
    Replies: 4
    Last Post: 15 Mar 2010, 06:32 AM
  3. Show "Units In Stock" for certain product only.
    By laydiefa in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 26 Nov 2008, 08:08 PM
  4. Replies: 2
    Last Post: 8 Jun 2008, 07:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR