Zen Cart Logo
Forums / All Other Contributions/Addons / Stocks by attributes

Stocks by attributes

Locked

Views: 251,275

Results 821 to 840 of 1,126
This thread is locked. New replies are disabled.
25 Oct 2009, 4:32 PM
#821
divavocals avatar

divavocals

Totally Zenned

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

Stocks by attributes

Springboard SEO:

I tried the following on a client's site, and it fixed the problem right away. Out-of-stock attribute values are no longer displayed in my attributes dropdowns. Thank you very much krazykev.

I had first tried Kellan's fix (directly below) without success:

I strikes me as odd that the Stocks by attributes mod would be missing this functionality.

Actually it's not that odd at all since this FIX only works with ONE SINGLE attributes.. It's not included in the Stock by Attributes code because at best it would be a HALF solution based on what Stock by Attributes allows you to do. If you refer to the readme file included:

What This Module Does This add-on allows a store owner to set a stock value for each variant of a product. For example, if you have three sizes, large, medium and small, this module will allow you to keep track of all the different quantities. It will work for a virtually unlimited number of amount of attribute combinations. For example, if you offered cotton or polyester shirts in green, red or blue and small medium or large sizes, this add-on would allow you to enter and maintain a separate stock level for each of the 18 possible combinations.Stock By Attributes is meant to track stock for product variants. A product variant is a combination of attributes which have stock associated with them.

This often referred to "fix" only addresses single attribute variants. Hence why it is NOT included in the Stock By Attributes add-on. A REAL solution would be to address the display of ALL product variants not just single attribute variants..

I wanted to make it CLEAR to anyone who thinks this fix will work with multiple attribute variants.. (It doesn't..)

25 Oct 2009, 10:03 PM
#822
centec2b avatar

centec2b

New Zenner

Join Date:
May 2008
Posts:
52
Plugin Contributions:
0

Re: Stocks by attributes

First if this is in the wrong thread - apologies. I am talking about the latest version 1.4.8 by Numinix although I think the question applies to all versions

First - brilliant contribution - respect and thanks to the contributing authors

My query; the sort order of the information generated. Many people have pointed out that the reporting of sub attribute numbers is not hierarchal.

eg you can get a situation like this

Attachment #6624

In this example it would make more sense for the data to be organised by size and then colour

I understand that the sort order is not manipulated by the contribution so the order should be inherited from Option Names and Option Values.

Problem - no matter how many times I change the sort order of these items and update through the Store Manager, the contribution refuses to change the original order (as per the example)

When I start to dig around in the files in Admin (admin/includes/classes/products_with_attributes_stock.php) I see there is a whole lot of data that is hard ordered

Can anyone guide me on this please - ie how do I influence the sort order without tampering with the contribution

Thank you

26 Oct 2009, 3:49 AM
#823
divavocals avatar

divavocals

Totally Zenned

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

Re: Stocks by attributes

So I've been testing the latest version of this add-on (v 1.4.8 by Numinix). Looks like it's a corrected version of the 4.7ajax version. Almost everything works (at least it doesn't error out anymore.. The addition of the feature to quickly resync all quantities at once is also nice..

However there are two features that either do not work or do not work intuitively.
(I will post the 1st here, and the 2nd in a seperate post)
First feature:

  • search filter: "%ma" filters all produchts with "ma" in products-name or in products-model; the search value will be stored in a cookieThis feature works, though the UI is not very intuitive. It is not CLEAR looking at the UI that after entering the search criteria that you must click the "Enter" key to execute your search, and it is also not clear that the "Store" button is meant to update the "Quantity in Stock" values. So to help make the UI a little clearer, I made the following changes:

I updated the admin/includes/products_with_attributes_stock_ajax.css file by adding the following:

#store{
    float: right;
    margin-top: -16px;
    margin-right: 40px;
    }
    
#store1{
    float: right;
    /*margin-top: -1px;*/
    margin-right: 35px;
    font-weight: bold;
    }
    
#pwas-search{
    float: left;
    margin-top: 25px;
    margin-left: 70px;
    font-weight: bold;
    }
    
#pwas-search1{
    float: left;
    margin-top: 27px;
    margin-left: 5px;
    font-weight: bold;
    } 
```I then updated the **admin/products_with_attributes_stock.php** as follows:
Around line 453 replace:
```php
    echo '<div id="hugo1" style="background-color: green; padding: 2px 10px;"></div>';    
    echo '<form method="get" action="products_with_attributes_stock_ajax.php" id="pwas-search" name="pwas-search">Search:  <input id="pwas-filter" type="text" name="search"/></form>';
    echo '<form method="post" action="products_with_attributes_stock_ajax.php?save=1" id="store" name="store"><input type="submit" value="store" id="store" name="store"/>';
    echo '<span id="loading" style="display: none;"><img src="../images/ajax-loader2.gif" alt="" /> Loading...</span><hr />';
    echo '<a class="forward" style="float:right;" href="'.zen_href_link(FILENAME_PRODUCTS_WITH_ATTRIBUTES_STOCK, "action=resync_all", 'NONSSL').'"><strong>Sync All Quantities</strong></a><br class="clearBoth" /><hr />';
```with this:
```php
    echo '<div id="hugo1" style="background-color: green; padding: 2px 10px;"></div>';    
    echo '<form method="get" action="products_with_attributes_stock_ajax.php" id="pwas-search" name="pwas-search">Search:  <input id="pwas-filter" type="text" name="search"/></form> <div id="pwas-search1">Click Enter to Search</div>';
    echo '<div id="store1">Click "Store" to Update Stock Quantities</div> <form method="post" action="products_with_attributes_stock_ajax.php?save=1" id="store" name="store"><input type="submit" value="store" id="store" name="store"/><br />';
    echo '<span id="loading" style="display: none;"><img src="../images/ajax-loader2.gif" alt="" /> Loading...</span><br /><hr />';
    echo '<a class="forward" style="float:right;" href="'.zen_href_link(FILENAME_PRODUCTS_WITH_ATTRIBUTES_STOCK, "action=resync_all", 'NONSSL').'"><strong>Sync All Quantities</strong></a><br class="clearBoth" /><hr />';
```These changes make the UI a little clearer IMO..
26 Oct 2009, 3:54 AM
#824
divavocals avatar

divavocals

Totally Zenned

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

Re: Stocks by attributes

Continuing from my previous post.

Second feature:

  • a click at the "quantity in stock" value adds an input-field & you can enter the new value; the store button saves all changed valuesThis does not work for me. When I click in the "quantity in stock" value and enter a new value, then click the "store" button, I get the following error:
    1146 Table 'othclients1.products_with_attributes_stock' doesn't exist
    in:
    [UPDATE products_with_attributes_stock SET quantity = '3' WHERE products_with_attributes_stock.stock_id =12 LIMIT 1]
    If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.Additionally the error appears as an onscreen error as well as in a popup window.. I would love to fix the error and get rid of the popup window.. The onscreen error message is better IMO..

Any thoughts??

26 Oct 2009, 4:43 AM
#825
divavocals avatar

divavocals

Totally Zenned

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

Re: Stocks by attributes

Well I knew it was too good to be true..:laugh::laugh: The new Ajax version has some of the same issues as the previous Ajax version.. The UI from the Admin side looks like alphabet soup in Internet Explorer.. The ONLY thing that doesn't display like a hot ugly mess are the product variants.. Back to Kurois version I go.. I may mess around with some more to get a feel for why the UI looks so messy, but Kurois version continues to be the only trouble free version of this add-on available..

27 Oct 2009, 11:50 PM
#826
starchang98 avatar

starchang98

New Zenner

Join Date:
Sep 2009
Posts:
45
Plugin Contributions:
0

Re: Stocks by attributes

sorry to interrupt, im a newbie...i installed this mod a while ago and it worked fine, i just dont know how to add another product to this mod. i have to products but only one is showing in stock attributes...how do i configure another product? thanks for any replies

28 Oct 2009, 12:01 AM
#827
starchang98 avatar

starchang98

New Zenner

Join Date:
Sep 2009
Posts:
45
Plugin Contributions:
0

Re: Stocks by attributes

okay i just figured it out..silly me...i just had to add attributes first...silly silly me :wacko:

30 Oct 2009, 2:01 AM
#828
springboard_seo avatar

springboard_seo

New Zenner

Join Date:
Oct 2009
Posts:
4
Plugin Contributions:
0

Re: Stocks by attributes

DivaVocals:

Actually it's not that odd at all since this FIX only works with ONE SINGLE attributes.. It's not included in the Stock by Attributes code because at best it would be a HALF solution based on what Stock by Attributes allows you to do. If you refer to the readme file included:
Stock By Attributes is meant to track stock for product variants. A product variant is a combination of attributes which have stock associated with them.

This often referred to "fix" only addresses single attribute variants. Hence why it is NOT included in the Stock By Attributes add-on. A REAL solution would be to address the display of ALL product variants not just single attribute variants..

I wanted to make it CLEAR to anyone who thinks this fix will work with multiple attribute variants.. (It doesn't..)

Thanks for specifying that, I just realized tonight that it only works for one attribute. What a disappointment. Is there no way to make this work for more than one attribute?

30 Oct 2009, 2:17 AM
#829
divavocals avatar

divavocals

Totally Zenned

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

Re: Stocks by attributes

Springboard SEO:

Thanks for specifying that, I just realized tonight that it only works for one attribute. What a disappointment. Is there no way to make this work for more than one attribute?It's software.. of course there is a way to do this.. But the question should be, "Has someone released a version of SBA which includes this feature??" The answer is no..:no:

30 Oct 2009, 2:22 AM
#830
springboard_seo avatar

springboard_seo

New Zenner

Join Date:
Oct 2009
Posts:
4
Plugin Contributions:
0

Re: Stocks by attributes

DivaVocals:

Actually it's not that odd at all since this FIX only works with ONE SINGLE attributes.. It's not included in the Stock by Attributes code because at best it would be a HALF solution based on what Stock by Attributes allows you to do. If you refer to the readme file included:
Stock By Attributes is meant to track stock for product variants. A product variant is a combination of attributes which have stock associated with them.

This often referred to "fix" only addresses single attribute variants. Hence why it is NOT included in the Stock By Attributes add-on. A REAL solution would be to address the display of ALL product variants not just single attribute variants..

I wanted to make it CLEAR to anyone who thinks this fix will work with multiple attribute variants.. (It doesn't..)

Is there some solution to the problem of letting a customer know whether or not stock is available with their chosen attributes before they attempt to go to checkout? This is what seems like it should be basic functionality to me in a shopping cart.

30 Oct 2009, 2:27 AM
#831
divavocals avatar

divavocals

Totally Zenned

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

Re: Stocks by attributes

Springboard SEO:

Is there some solution to the problem of letting a customer know whether or not stock is available with their chosen attributes before they attempt to go to checkout? This is what seems like it should be basic functionality to me in a shopping cart.It's software.. It can be done, but if anyone has found a solution, they have not shared it with the community.. The upcoming Zen Cart 2.0 release will include these features..

You might wanna take a looksee at the Grid Attributes add-on.. It has been written to work specifically with SBA.. If you want to get a sense of what it does, check out this link:
http: // clients dot overthehillweb dot com/hairisle/Stock-Lace-Wigs/Chinese-Remy-Brazilian-Curl-Full-Lace-Perimeter-Medium

30 Oct 2009, 3:29 AM
#832
springboard_seo avatar

springboard_seo

New Zenner

Join Date:
Oct 2009
Posts:
4
Plugin Contributions:
0

Re: Stocks by attributes

DivaVocals:

It's software.. It can be done, but if anyone has found a solution, they have not shared it with the community.. The upcoming Zen Cart 2.0 release will include these features..

You might wanna take a looksee at the Grid Attributes add-on.. It has been written to work specifically with SBA.. If you want to get a sense of what it does, check out this link:
http: // clients dot overthehillweb dot com/hairisle/Stock-Lace-Wigs/Chinese-Remy-Brazilian-Curl-Full-Lace-Perimeter-Medium

Looks good - I'll be all over it first thing in the morning. Thanks DivaVocals.

30 Oct 2009, 9:31 PM
#833
milobloom avatar

milobloom

Totally Zenned

Join Date:
Feb 2004
Posts:
1,267
Plugin Contributions:
1

Re: Stocks by attributes

I installed a fix that will take away the selection if its not in stock.

as in

Small - 0
Med - 0
Large - 8

Will just show

Large

However, when that goes out of stock. I get an error like this listing

http://www.nothingbutcostumes.com/index.php?main_page=product_info&products_id=17482

1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND pa2.products_attributes_id IN (11937) ' at line 3
in:
[SELECT count(DISTINCT pa1.options_id) AS matches FROM products_attributes pa1, products_attributes pa2 WHERE pa1.products_attributes_id IN () AND pa2.products_attributes_id IN (11937) AND pa1.options_id = pa2.options_id]

3 Nov 2009, 11:11 PM
#834
shackrock avatar

shackrock

New Zenner

Join Date:
Nov 2009
Posts:
3
Plugin Contributions:
0

Re: Stocks by attributes

So I am pretty well versed in mod installs, etc... however in the install file it just says "merge changes if you have other mods installed that use these same files."

Well, I DO have ohter mods that have changed these same files...

How come the install doesn't tell me what relevant code needs to be merged, and where it should be placed in the php files? Am I missing something here?

Thanks all

3 Nov 2009, 11:45 PM
#835
divavocals avatar

divavocals

Totally Zenned

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

Re: Stocks by attributes

shackrock:

So I am pretty well versed in mod installs, etc... however in the install file it just says "merge changes if you have other mods installed that use these same files."

Well, I DO have ohter mods that have changed these same files...

How come the install doesn't tell me what relevant code needs to be merged, and where it should be placed in the php files? Am I missing something here?

Thanks allsimply put because the mod author didn't offer the add-on that way.. and honestly almost all Zen Cart add-ons are packaged up the exact same way.. You will need a tool like Winmerge to make sure you incorporate only the changes needed for the add-on to work in any files that may be overwritten by the add-on..

4 Nov 2009, 12:33 AM
#836
shackrock avatar

shackrock

New Zenner

Join Date:
Nov 2009
Posts:
3
Plugin Contributions:
0

Re: Stocks by attributes

DivaVocals:

simply put because the mod author didn't offer the add-on that way.. and honestly almost all Zen Cart add-ons are packaged up the exact same way.. You will need a tool like Winmerge to make sure you incorporate only the changes needed for the add-on to work in any files that may be overwritten by the add-on..

man really? I feel like a majority of people would fail miserably at this task then... heck I might too, haha. Looks like I might be sticking with OSC afterall.... unless somebody else has some tips?

4 Nov 2009, 12:53 AM
#837
divavocals avatar

divavocals

Totally Zenned

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

Re: Stocks by attributes

shackrock:

man really? I feel like a majority of people would fail miserably at this task then... heck I might too, haha.I think a majority would fail miserably if they were provided only the code changes.. AND, the mod author has no way of knowing what other changes you may have already made for other add-ons.. If this is what you're used to with OSC, then that explains a LOT of the problems I saw with mods when last I peeked in there..

shackrock:

Looks like I might be sticking with OSC afterall.... unless somebody else has some tips?Yes.. get Winmerge (or a similar tool) and try 1st before giving up.. :smile:

as for OSC??? IMO staying with OSC is a step backwards.. That project is NOT moving forward at all..

4 Nov 2009, 11:01 AM
#838
niccol avatar

niccol

Totally Zenned

Join Date:
Apr 2009
Posts:
2,138
Plugin Contributions:
1

Re: Stocks by attributes

Most recent version.

I think this is a bug. When I do a search that works properly. The sort is achieved. However, clearing that search is a problem.

It looks like a post (or get) parameter is not being cleared. Every time the page refreshes after that - regardless - that search is implemented.

Have others noticed this?

Nick

4 Nov 2009, 5:02 PM
#839
exeter_acres avatar

exeter_acres

New Zenner

Join Date:
Dec 2008
Posts:
70
Plugin Contributions:
0

Re: Stocks by attributes

Trying to get this mod to work.....

I have installed it in a test database..
No errors..
I can adjust the quantities in admin....

but when i add an item to the cart that I have set its attribute to zero, nothing happens and it is allowed to be added to the cart....

did I miss something?

thoughts on this??

Thanks
Exeter

4 Nov 2009, 5:07 PM
#840
divavocals avatar

divavocals

Totally Zenned

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

Re: Stocks by attributes

niccol:

Most recent version.

I think this is a bug. When I do a search that works properly. The sort is achieved. However, clearing that search is a problem.

It looks like a post (or get) parameter is not being cleared. Every time the page refreshes after that - regardless - that search is implemented.

Have others noticed this?

NickThe most recent version (which is supposed to fix the Ajax version) has a few bugs.. Go back to page 83 of this thread.. I posted my musings on the matter..:smile:

Gonna stick with what works.. Kuroi's version still works without any issues..