Zen Cart Logo
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: 658,546

Results 2,001 to 2,020 of 3,609
6 Jan 2015, 9:41 PM
#2001
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

karinvd:

I had a problem with combination of zen-colorbox2 and SBA. When i used an attribute with a drop down menu, the image did not load. On line 42 of includes\functions\extra_functions\products_with_attributes.php i found the next code which showed on a product page when i used a drop down menu, if i used a check box or a radio button it did not show and zen-colorbox2 worked fine. So i comment this line out.
Wil i get problems with?

$field = '<script src="'.DIR_WS_TEMPLATES . $template_dir . '/jscript/jquery-1.10.2.min.js"></script>
      <script type="text/javascript">
             $(function(){
                $("#attrib-'.$tmp_attribID.'").on("click", function(){
                    $("#SBA_ProductImage").attr("src", $(this).find(":selected").attr("data-src"));
                });
            });
   </script>'; 

It may be that the code for zen-colorbox (assuming the one available from <http://www.zen-cart.com/downloads.php?do=file&id=1322>) and the SBA code should be brought into line (Thinking that #SBA_ProductImage above might need to be modified to account for this) Of course it would impact multiple locations of the code, but at least then SBA would be more in line with colorbox and possibly other image managing code...  Also assuming that the version being applied to the ZC 1.5.4 development site is what is referenced above, and if so an issue should be opened on github to address this aspect for tracking and development.  As far as commenting the line/section out, well, in review of the code snippet it appears the "problem" would be that when using a dropdown that the image will not change respective to the dropdown selection.  That aspect actually is an additional "feature" anyways.
7 Jan 2015, 4:46 AM
#2002
divavocals avatar

divavocals

Totally Zenned

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

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

mc12345678:

It may be that the code for zen-colorbox (assuming the one available from http://www.zen-cart.com/downloads.php?do=file&id=1322) and the SBA code should be brought into line (Thinking that #SBA_ProductImage above might need to be modified to account for this) Of course it would impact multiple locations of the code, but at least then SBA would be more in line with colorbox and possibly other image managing code... Also assuming that the version being applied to the ZC 1.5.4 development site is what is referenced above, and if so an issue should be opened on github to address this aspect for tracking and development. As far as commenting the line/section out, well, in review of the code snippet it appears the "problem" would be that when using a dropdown that the image will not change respective to the dropdown selection. That aspect actually is an additional "feature" anyways.

If I had to hazzard a guess, I'd say that this part:

<script src="'.DIR_WS_TEMPLATES . $template_dir . '/jscript/jquery-1.10.2.min.js"></script>
```is the issue.. Not sure why there would be a need to load jQuery HERE.. But I'll certainly bet that this is conflicting with the jQuery loaded from Zen Colorbox..
8 Jan 2015, 12:09 PM
#2003
karinvd avatar

karinvd

New Zenner

Join Date:
Nov 2012
Location:
Utrecht, Nederland
Posts:
43
Plugin Contributions:
0

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

Thank you both :-) Divavocals you are right. I removed

<script src="'.DIR_WS_TEMPLATES . $template_dir . '/jscript/jquery-1.10.2.min.js"></script>

it now looks like:

$field = '<script type="text/javascript">
                 $(function(){
                    $("#attrib-'.$tmp_attribID.'").on("click", function(){
                        $("#SBA_ProductImage").attr("src", $(this).find(":selected").attr("data-src"));
                    });
                });
       </script>';

And is still worked.
mc12345678 thanks for telling me wat the snippet actually does.

13 Jan 2015, 6:41 PM
#2004
christian_wagner avatar

christian_wagner

New Zenner

Join Date:
May 2013
Location:
Long Branch, NJ
Posts:
49
Plugin Contributions:
0

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

jeking:

All code on GitHub should be considered as BETA. You're welcome to use it and provide any feedback. Take the necessary precautions, backup or install on a development cart first.

Hey Jeking - with the upcoming PHP5.5 upgrade, anything below 1.5.4 will not work. Will SBA be ready by the time March 15th rolls around?

Thank you!

13 Jan 2015, 7:00 PM
#2005
jeking avatar

jeking

Totally Zenned

Join Date:
Oct 2005
Location:
Chicago, IL USA
Posts:
1,592
Plugin Contributions:
0

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

Christian_Wagner:

Hey Jeking - with the upcoming PHP5.5 upgrade, anything below 1.5.4 will not work. Will SBA be ready by the time March 15th rolls around?

Thank you!

Free plugins like this are written and updated voluntarily, as time allows. I am just one of the contributors to this plugin. The final decision is up to DivaVocals.

13 Jan 2015, 7:03 PM
#2006
christian_wagner avatar

christian_wagner

New Zenner

Join Date:
May 2013
Location:
Long Branch, NJ
Posts:
49
Plugin Contributions:
0

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

jeking:

Free plugins like this are written and updated voluntarily, as time allows. I am just one of the contributors to this plugin. The final decision is up to DivaVocals.

Awesome. Thanks for the quick response!

13 Jan 2015, 7:10 PM
#2007
divavocals avatar

divavocals

Totally Zenned

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

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

jeking:

Free plugins like this are written and updated voluntarily, as time allows. I am just one of the contributors to this plugin. The final decision is up to DivaVocals.

For SBA????????????????????? Oh no.. not me..:laugh: I haven't used this forked to death module in quite some time..

I kept hoping that someone would wrangle ALL the many SBA forks into one WORKING module, but that's NEVER happened.. Every fork seems focused ONLY on single dropdown attributes, and not attribute combos.. No support for "optional" non-stock bearing attributes.. None of these forks ever worked for my clients, and I do have ONE client using a version I paid to have modified for her needs, but underneath, it's still SBA and all it's faults.. So I now use a commercial stock by attributes management module by Vinos de Frutas Tropicales and POOF problem gone

vinosdefrutastropicales(dot)com/index(dot)php?main_page=product_info&cPath=2_7&products_id=46

13 Jan 2015, 7:46 PM
#2008
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

The version discussed being worked on github is to handle multiple attributes shortly, there is a branch under review that will accommodate single and multiple attributes. One of the files a part of dynamic dropdowns has also just been added with modification so that all product with attributes does not require SBA tracking. Further modification is being considered to support display of out-of-stock combinations of items, though that does require a bit of an overhaul to create an applicable dynamic dropdown class in addition to what was provided by dynamic dropdowns.

While I might agree that the goal seems to have been single attribute related, there has been a push to support multi-attributes, and the next "major" step is to support attributes that are not stock dependent. (Ie. Gift wrap, etc.) As well as porting over to ZC 1.5.4. Other aspects of incorporation are to merge in data from SBA into existing reporting tools such as products purchased. Certainly there are things to be done, but it does seem like with the backbone of attributes in ZC as they are, a lot of progress has been made to do exactly as Diva has pointed out, merge the functionality of the various versions into a single tool. Comment and suggestions are certainly welcome as without identification of issues, the problem(s) may not be found or corrected...

13 Jan 2015, 8:08 PM
#2009
divavocals avatar

divavocals

Totally Zenned

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

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

mc12345678:

The version discussed being worked on github is to handle multiple attributes shortly, there is a branch under review that will accommodate single and multiple attributes. One of the files a part of dynamic dropdowns has also just been added with modification so that all product with attributes does not require SBA tracking. Further modification is being considered to support display of out-of-stock combinations of items, though that does require a bit of an overhaul to create an applicable dynamic dropdown class in addition to what was provided by dynamic dropdowns.

While I might agree that the goal seems to have been single attribute related, there has been a push to support multi-attributes, and the next "major" step is to support attributes that are not stock dependent. (Ie. Gift wrap, etc.) As well as porting over to ZC 1.5.4. Other aspects of incorporation are to merge in data from SBA into existing reporting tools such as products purchased. Certainly there are things to be done, but it does seem like with the backbone of attributes in ZC as they are, a lot of progress has been made to do exactly as Diva has pointed out, merge the functionality of the various versions into a single tool. Comment and suggestions are certainly welcome as without identification of issues, the problem(s) may not be found or corrected...

So does this NOW include WORKING sequenced attributes?? ie: I select on option and any options which in combination with the option I selected would be out of stock are not presented..

For example I am looking a womans shoe which comes
in the following sizes: 6, 7, 8, 9, & 10
in the following colors: Black, Red, Forrest Green, Tan, Dark Brown, Blue

Black is out of stock in ANY size
Forrect Green is out of stock in sizes 6 & 10

I expect that if I choose size 6 that the color options for Black and Forrest Green will, depending on the admin settings, either NOT show at all or IF they display, they will clearly display the words "Out of Stock" next to the option value.

Is this NOW a feature of the project in progress on Github??????

13 Jan 2015, 8:28 PM
#2010
jeking avatar

jeking

Totally Zenned

Join Date:
Oct 2005
Location:
Chicago, IL USA
Posts:
1,592
Plugin Contributions:
0

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

DivaVocals:

For SBA????????????????????? Oh no.. not me..:laugh: I haven't used this forked to death module in quite some time..

My mistake, I meant to say potteryhouse I was confusing plugins ;-)

13 Jan 2015, 9:20 PM
#2011
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

DivaVocals:

So does this NOW include WORKING sequenced attributes?? ie: I select on option and any options which in combination with the option I selected would be out of stock are not presented..

For example I am looking a womans shoe which comes
in the following sizes: 6, 7, 8, 9, & 10
in the following colors: Black, Red, Forrest Green, Tan, Dark Brown, Blue

Black is out of stock in ANY size
Forrect Green is out of stock in sizes 6 & 10

I expect that if I choose size 6 that the color options for Black and Forrest Green will, depending on the admin settings, either NOT show at all or IF they display, they will clearly display the words "Out of Stock" next to the option value.

Is this NOW a feature of the project in progress on Github??????

I'm awaiting confirmation that the code provides exactly the "hide" of out-of-stock options of a multi-attribute product by independent review, but yes with Dynamic dropdown installed as is (don't use the template file provided with that plugin) then only instock items are displayed. A further effort is being taken to provide the out-of-stock options for multiple attribute product which is a revision of the dynamic dropdowns sequenced dropdown, to allow/support use of the dynamic dropdowns plugin. (Pretty cool little mix of code, just missed out on some of the implementation as SBA was written/adapted/etc.)

Just to state again, the code that supports multi (as well as single attribute) product is still in a separate branch but is to be merged soon.

13 Jan 2015, 10:13 PM
#2012
divavocals avatar

divavocals

Totally Zenned

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

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

mc12345678:

I'm awaiting confirmation that the code provides exactly the "hide" of out-of-stock options of a multi-attribute product by independent review, but yes with Dynamic dropdown installed as is (don't use the template file provided with that plugin) then only instock items are displayed. A further effort is being taken to provide the out-of-stock options for multiple attribute product which is a revision of the dynamic dropdowns sequenced dropdown, to allow/support use of the dynamic dropdowns plugin. (Pretty cool little mix of code, just missed out on some of the implementation as SBA was written/adapted/etc.)

Just to state again, the code that supports multi (as well as single attribute) product is still in a separate branch but is to be merged soon.

Will be interesting to see how this shakes out.. Until then I will use the commercial option for my clients who need this functionality..

19 Jan 2015, 12:46 AM
#2013
divavocals avatar

divavocals

Totally Zenned

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

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

DivaVocals:

I kept hoping that someone would wrangle ALL the many SBA forks into one WORKING module, but that's NEVER happened..So I stand corrected on this statement.. it would appear that all but one of the SBA forks in the downloads section have disappeared.. IMHO, this move is LONG overdue, and all those forks should have never seen the light of day AT ALL.. Though in my opinion this module has improved with a focused development effort, and consolidation of the BEST of those many forks, it is still a LONG ways from something I can consider using on a client site yet.. However, I am glad to see a SINGULAR effort moving forward on this module, and I am looking forward to the day when once again it reliably has all the feature my clients ask for..

jeking:

My mistake, I meant to say potteryhouse I was confusing plugins ;-):laugh: I understand..

19 Jan 2015, 1:24 AM
#2014
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

DivaVocals:

So I stand corrected on this statement.. it would appear that all but one of the SBA forks in the downloads section have disappeared.. IMHO, this move is LONG overdue, and all those forks should have never seen the light of day AT ALL.. Though in my opinion this module has improved with a focused development effort, and consolidation of the BEST of those many forks, it is still a LONG ways from something I can consider using on a client site yet.. However, I am glad to see a SINGULAR effort moving forward on this module, and I am looking forward to the day when once again it reliably has all the feature my clients ask for..

:laugh: I understand..

Interested to know, what features are missing that are so strongly desired/needed? Or shall we read minds? :P (bbbzzztttt mind machine trying to read... :) )

19 Jan 2015, 1:31 AM
#2015
divavocals avatar

divavocals

Totally Zenned

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

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

mc12345678:

Interested to know, what features are missing that are so strongly desired/needed? Or shall we read minds? :P (bbbzzztttt mind machine trying to read... :) )

Well.. I think I already stated in previous posts what features I would be looking for/think are lacking in SBA.. Do you NEED me to re-state or quote my previous posts???

19 Jan 2015, 1:36 AM
#2016
divavocals avatar

divavocals

Totally Zenned

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

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

Regarding this previously referenced code... I'd like to make a suggestion...

karinvd:

I had a problem with combination of zen-colorbox2 and SBA. When i used an attribute with a drop down menu, the image did not load. On line 42 of includes\functions\extra_functions\products_with_attributes.php i found the next code which showed on a product page when i used a drop down menu, if i used a check box or a radio button it did not show and zen-colorbox2 worked fine. So i comment this line out.
Wil i get problems with?

$field = '<script src="'.DIR_WS_TEMPLATES . $template_dir . '/jscript/jquery-1.10.2.min.js"></script>
      <script type="text/javascript">
             $(function(){
                $("#attrib-'.$tmp_attribID.'").on("click", function(){
                    $("#SBA_ProductImage").attr("src", $(this).find(":selected").attr("data-src"));
                });
            });
   </script>'; 


In the Zen Colorbox code, we will be doing the following in the next release:

<?php //Load jQuery ONLY if jQuery has not been loaded. This is to support versions of Zen Cart prior to v1.5.4 because jQuery was not part of core code //Also want to prevent jQuery from loading again if bundled with a plugin or template package ?> <script type="text/javascript"> if (typeof jQuery == 'undefined') { document.write('script type="text/javascript" src="//code.jquery.com/jquery-1.11.1.min.js"><\/script>'); } </script>

May I suggest that SBA do something similar if it ABSOLUTELY has to make a jQuery call within it's code...
19 Jan 2015, 1:51 AM
#2017
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

DivaVocals:

Regarding this previously referenced code... I'd like to make a suggestion...

In the Zen Colorbox code, we will be doing the following in the next release:

<?php //Load jQuery ONLY if jQuery has not been loaded. This is to support versions of Zen Cart prior to v1.5.4 because jQuery was not part of core code //Also want to prevent jQuery from loading again if bundled with a plugin or template package ?> <script type="text/javascript"> if (typeof jQuery == 'undefined') { document.write('script type="text/javascript" src="//code.jquery.com/jquery-1.11.1.min.js"><\/script>'); } </script>
> 
> May I suggest that SBA do something similar if it ABSOLUTELY has to make a jQuery call within it's code...

In the effort to make SBA compatible with zC 1.5.4, the calls to jquery are being reworked, and any/all methods of not duplicating loading of jquery are being considered, with that or similar being considered especially that one.

So summary of known issues to incorporate: identification/presentation of out-of-stock items for all styles of attributes, products being able to have attributes that are not stock dependent (popular comparison is gift wrapping), obviously multiple attribute capability in addition to single attribute, possibly multiple attribute without the need for sequenced selection.

Those are the features that I can recall that are not yet fully incorporated, but are in design consideration. What's missing from that list?
19 Jan 2015, 2:28 AM
#2018
divavocals avatar

divavocals

Totally Zenned

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

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

mc12345678:

In the effort to make SBA compatible with zC 1.5.4, the calls to jquery are being reworked, and any/all methods of not duplicating loading of jquery are being considered, with that or similar being considered especially that one.

So summary of known issues to incorporate: identification/presentation of out-of-stock items for all styles of attributes, products being able to have attributes that are not stock dependent (popular comparison is gift wrapping), obviously multiple attribute capability in addition to single attribute, possibly multiple attribute without the need for sequenced selection.

Those are the features that I can recall that are not yet fully incorporated, but are in design consideration. What's missing from that list?

Okay... Soooo.. In order to answer your question, I guess I DO have to quote what I've posted before.. :smile:

DivaVocals:

Every fork seems focused ONLY on single dropdown attributes, and not attribute combos.. No support for "optional" non-stock bearing attributes..

DivaVocals:

So does this NOW include WORKING sequenced attributes?? ie: I select on option and any options which in combination with the option I selected would be out of stock are not presented..

For example I am looking a womans shoe which comes
in the following sizes: 6, 7, 8, 9, & 10
in the following colors: Black, Red, Forrest Green, Tan, Dark Brown, Blue

Black is out of stock in ANY size
Forrect Green is out of stock in sizes 6 & 10

I expect that if I choose size 6 that the color options for Black and Forrest Green will, depending on the admin settings, either NOT show at all or IF they display, they will clearly display the words "Out of Stock" next to the option value.

If your list covers this and more (it appears that this is the case), then I'll await to see what the next release offers..

4 Feb 2015, 1:57 PM
#2019
rick29690 avatar

rick29690

New Zenner

Join Date:
May 2009
Location:
Travelers Rest, SC
Posts:
22
Plugin Contributions:
0

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

I am having an issue with SBA 1.5.3 in Zen Cart 1.5.4.

I have 2 nearly identical websites. Both are hosted by BlueHost on Linux. Both are run by PHP 5.4. Both were, up until mid-January, running Zen Cart 1.5.0 and SBA with no problem. I upgraded both to 1.5.4. The only difference between the 2 sites is one of them uses the template "Andover Modern" by Picaflor-Azul, the other "A Modern Zen" by Jamie Cairney rainbow-designs.co.uk.

After upgrading to Zen Cart 1.5.4, the website using the Jamie Cairney template is working fine, with SBA 1.5.3. The website running the Picaflor-Azul template is having the problem. After several tries at upgrading the site, I had to uninstall SBA then upgrade to 1.5.4. Once upgraded, I then installed the files, pointed the browser to my site and the SBA install file. The result is a blank screen in admin. It won't even show the login screen.

Any help would be appreciated. If any additional info is needed, please let me know. Thanks!

4 Feb 2015, 2:00 PM
#2020
rodg avatar

rodg

Deceased

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

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

Rick29690:

The result is a blank screen in admin. It won't even show the login screen.

A blank page usually results in something being written to the error logs. Have you checked them for any clues?

Cheers
RodG