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,376

Results 1,301 to 1,320 of 3,609
22 Sep 2011, 4:48 PM
#1301
ssteel avatar

ssteel

New Zenner

Join Date:
Aug 2011
Posts:
8
Plugin Contributions:
0

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

Is there a way to not have an attribute option appear if the stock for that option is zero? Rather than have the customer sent to the cart and then find out it is not available...

ie product AA has 3 options: small, medium & large. Stock values are : 1,** 0**, **1 **respectively. Ideally the selections presented on the product page are: small and large as that is all that is in stock.

22 Sep 2011, 5:29 PM
#1302
athena avatar

athena

Totally Zenned

Join Date:
Jan 2006
Location:
NM
Posts:
740
Plugin Contributions:
0

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

In our dreams...

ssteel:

Is there a way to not have an attribute option appear if the stock for that option is zero? Rather than have the customer sent to the cart and then find out it is not available...

ie product AA has 3 options: small, medium & large. Stock values are : 1,** 0**, **1 **respectively. Ideally the selections presented on the product page are: small and large as that is all that is in stock.

22 Sep 2011, 9:24 PM
#1303
soxophoneplayer avatar

soxophoneplayer

Totally Zenned

Join Date:
Feb 2008
Posts:
534
Plugin Contributions:
0

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

ssteel said:> Is there a way to not have an attribute option appear if the stock for that option is zero? Rather than have the customer sent to the cart and then find out it is not available...

Sort of. I'm zc 1.3.9h, using SbA v 1.4.9 with ajax (I haven't updated as folks seem to be having trouble with new versions that I am not having. So I am very afraid!)

I also use Product Attribute Grid v1.1.1

So my product page shows a grid - in my case by colour and size of socks. It shows HOW MANY are in stock underneath each type. If the stock is zero, the 'add # to cart' box for that type is replaced with a red 'x' - so at least the customer can not enter a buy for something not existing, and therefore won't be sent off to the cart before they find out.

If the customer enters a number higher than the number showing in stock for a type, they will be allowed to go to the checkout page - where they will get an error message about stock shortfall and they can revise their order.

sample product with an out of stock attribute:

http://www.meafordwool.com/Heavy-Wool-Socks/Sport

23 Sep 2011, 2:19 AM
#1304
carolinebogart avatar

carolinebogart

New Zenner

Join Date:
Apr 2007
Location:
Manchester, NH
Posts:
52
Plugin Contributions:
0

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

ssteel:

Is there a way to not have an attribute option appear if the stock for that option is zero? Rather than have the customer sent to the cart and then find out it is not available...

ie product AA has 3 options: small, medium & large. Stock values are : 1,** 0**, **1 **respectively. Ideally the selections presented on the product page are: small and large as that is all that is in stock.

You can have it not show the option at all or you can have it show as out of stock.

Search for Dynamic Dropdowns by SBA

23 Sep 2011, 3:04 PM
#1305
lindasdd avatar

lindasdd

Zen Follower

Join Date:
Jun 2007
Posts:
474
Plugin Contributions:
0

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

CarolineBogart:

You can have it not show the option at all or you can have it show as out of stock.

Search for Dynamic Dropdowns by SBA

I have SBA and Dynamic Dropdowns by SBA and can confirm that these two working together will appear the way the other poster requested. That is, out of stock items will no longer appear as an option.

-lindasdd

28 Sep 2011, 5:10 PM
#1306
wirefram avatar

wirefram

New Zenner

Join Date:
Apr 2011
Posts:
95
Plugin Contributions:
0

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

THANKS!!!!!!!! I've been pulling my hairs for days trying to find out how to solve the problem as customers with product out of stock in their cart were unable to place the order and with no error message they had no idea what to do!

Thanks a lot!

:hug:

29 Sep 2011, 12:57 AM
#1307
jodpcc avatar

jodpcc

New Zenner

Join Date:
Jun 2011
Posts:
6
Plugin Contributions:
0

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

When I uncomment this code if I add a product that is in stock to a cart which already contains something flagged as out of stock, although the header message remains:
"Products marked with *** are out of stock. Items not in stock will be placed on backorder."
The "***" flag is removed from the item which is out of stock. :(

CarolineBogart:

I hope this helps the people on this thread.

The store I'm debugging has both items priced by stock attributes and items not priced by stock attributes.

For items not priced by attributes, if the customer asked for a quantity greater than that in stock, but the "out of stock" message did not display.

In priced by attributes version 1.4.13, in
includes/modules/pages/shopping_cart/header_php.php,
the code to check for "out of stock" on items not priced by attributes is commented out.

Uncomment these lines at about line 146:
if (STOCK_CHECK == 'true') {
$flagStockCheck = zen_check_stock($products[$i]['id'], $products[$i]['quantity']);
if ($flagStockCheck == true) {
$flagAnyOutOfStock = true;
}
}

30 Sep 2011, 1:33 AM
#1308
carolinebogart avatar

carolinebogart

New Zenner

Join Date:
Apr 2007
Location:
Manchester, NH
Posts:
52
Plugin Contributions:
0

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

jodpcc: if I understand the question, I'd quibble with the fact that it's a problem. If I'm going to change code of that nature, I'm going to also wipe cache or reset the server or something to wipe out people's carts. It's not a fair test to change the code in mid cart like that.

30 Sep 2011, 10:54 AM
#1309
jodpcc avatar

jodpcc

New Zenner

Join Date:
Jun 2011
Posts:
6
Plugin Contributions:
0

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

I obviously didn't explain very well :blush:
The sequence of events is :

I revert to the standard module and uncomment the code in question.

I add a product that is in stock to my cart
I add a product that is out of stock to my cart
I add a product that is in stock to my cart

When I add the product which is out of stock it correctly processes i.e.
I get a header message saying "Products marked with *** are out of stock. Items not in stock will be placed on backorder."
A "***" flag appears next to the out of stock item in the cart.

When I add the next product which is in stock it processes incorrectly i.e.
I correctly get a header message saying "Products marked with *** are out of stock. Items not in stock will be placed on backorder."
Unfortunately the "***" flag no longer appears next to the out of stock item in the cart.

So I have reverted back to the "Athena Code" :smile: which processes correctly for me. I would appreciate it if some others could confirm the sequence of events on their systems for the standard module with the code uncommented as suggested by CarolineBogart, as this might be an issue specific to my system.

CarolineBogart:

jodpcc: if I understand the question, I'd quibble with the fact that it's a problem. If I'm going to change code of that nature, I'm going to also wipe cache or reset the server or something to wipe out people's carts. It's not a fair test to change the code in mid cart like that.

30 Sep 2011, 12:17 PM
#1310
athena avatar

athena

Totally Zenned

Join Date:
Jan 2006
Location:
NM
Posts:
740
Plugin Contributions:
0

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

I'm sorry I've been too swamped to try this in my test cart but have been monitoring this thread and will try late today.

30 Sep 2011, 12:41 PM
#1311
athena avatar

athena

Totally Zenned

Join Date:
Jan 2006
Location:
NM
Posts:
740
Plugin Contributions:
0

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

Yeah...sorry CarolineBogart - wish it worked but two things:

unlike jodpcc I still got the out of stock warning next to the original our of stock product....but no warning at all for the additional out of stock products I put in the cart.

when I put the old header_php back, everything was fine.

(had some down time so went for it...wouldn't hurt to play with this idea a bit more, if only the code writer for this version of the mod would comment)

2 Oct 2011, 3:34 AM
#1312
webstar59 avatar

webstar59

New Zenner

Join Date:
Jun 2011
Location:
California
Posts:
63
Plugin Contributions:
0

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

I have the same problem as icebeer posted on page 129.
The SAVE Button doesn't work on the admin Products with Attributes Stock page.
I have to change Quantity for all variants one by one.

I see in Version: 1.4.11 this bug was fixed;
(- fixed ability to update multiple stock attributes at once (use "save" button at top or bottom of page))

I'm using Version: 1.4.13 on Zen Cart™ Version: v1.3.9h.

Can anybody tell me how to fix this problem?

I'm looking at the file products_with_attributes_stock.php and the XJAX files hoping to find something.

2 Oct 2011, 5:22 PM
#1313
webstar59 avatar

webstar59

New Zenner

Join Date:
Jun 2011
Location:
California
Posts:
63
Plugin Contributions:
0

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

webstar59:

I have the same problem as icebeer posted on page 129.
The SAVE Button doesn't work on the admin Products with Attributes Stock page.
I have to change Quantity for all variants one by one.

I see in Version: 1.4.11 this bug was fixed;
(- fixed ability to update multiple stock attributes at once (use "save" button at top or bottom of page))

I'm using Version: 1.4.13 on Zen Cart™ Version: v1.3.9h.

Can anybody tell me how to fix this problem?

I'm looking at the file products_with_attributes_stock.php and the XJAX files hoping to find something.

IN the file (products_with_attributes_stock_ajax.js)
Should it read #save not #store

$(document).ready(function() { 
    // bind form using ajaxForm 
    $('#store').ajaxForm({ 
        // target identifies the element(s) to update with the server response 
        target: '#hugo1', 
        success: saved
 
        // success identifies the function to invoke when the server response 
        // has been received; here we apply a fade-in effect to the new content 
    }); 
});

I see no identifier named #store anywhere

2 Oct 2011, 6:01 PM
#1314
webstar59 avatar

webstar59

New Zenner

Join Date:
Jun 2011
Location:
California
Posts:
63
Plugin Contributions:
0

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

webstar59:

IN the file (products_with_attributes_stock_ajax.js)
Should it read #save not #store

$(document).ready(function() {
// bind form using ajaxForm
$('#store').ajaxForm({
// target identifies the element(s) to update with the server response
target: '#hugo1',
success: saved

    // success identifies the function to invoke when the server response 
    // has been received; here we apply a fade-in effect to the new content 
}); 

});

> 
> I see no identifier named #store anywhere

Just now found the error in the file products_with_attributes_stock.php on line 482.

    **echo '<div id="pwa-table"';**

IS MISSING >

It should read     **echo '<div id="pwa-table">';**
Everything is working now. 

I wounder what next bug I'll find if any. Hoping this is it
2 Oct 2011, 6:14 PM
#1315
webstar59 avatar

webstar59

New Zenner

Join Date:
Jun 2011
Location:
California
Posts:
63
Plugin Contributions:
0

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

icebeer:

My zencart is 1.3.8 I stalled the Add ON Stock by Attributes ,it works fine , but right now the SAVE Button doesn't work. I have to change Quantity for all variants one by one , not like before I can changed it in bulk.

I changed nothing, just few days ago it doesn't work.

Anyone can help me?
Thanks lot!

Just now found the error in the file products_with_attributes_stock.php on line 482.

echo '<div id="pwa-table"';

IS MISSING >

It should read echo '<div id="pwa-table">';

2 Oct 2011, 7:17 PM
#1316
jodpcc avatar

jodpcc

New Zenner

Join Date:
Jun 2011
Posts:
6
Plugin Contributions:
0

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

webstar59:

Just now found the error in the file products_with_attributes_stock.php on line 482.

echo '<div id="pwa-table"';

IS MISSING >

It should read echo '<div id="pwa-table">';

:clap: Fantastic webstar59, just applied this change and seems to work perfectly :o) Didn't even realise this feature existed (well I guess it didn't til just now), have just been trudging through updates one at a time :cry:

9 Oct 2011, 8:55 AM
#1317
busyboardwalk avatar

busyboardwalk

New Zenner

Join Date:
Jul 2010
Posts:
6
Plugin Contributions:
0

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

sigh :cry: I've spent hours reading through this thread to try to get this mod to work properly for me. I updated my header_php.php file with the code Athena posted on page 114 and it just will not work for me. I don't understand. It seems to be working for everyone else. I have no clue what to do and I'm almost ready to give up. :(

edited to add: I'm having the issue with the quantities not working properly in the shopping cart. Whenever something is added that's out of stock, it puts everything in the cart out of stock whether it's in stock or not.

10 Oct 2011, 3:06 PM
#1318
ces avatar

ces

Zen Follower

Join Date:
Nov 2004
Location:
West Mids, England
Posts:
199
Plugin Contributions:
0

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

I must say I'm having exactly the same problem. Going to read up some more.

10 Oct 2011, 4:53 PM
#1319
vipoptics avatar

vipoptics

New Zenner

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

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

HELP ! ! ! I downloaded the addon as instructed, but it is showing up in my back office just like this:

Product ID Product Name Product Model Quantity for all variants Add Quantity For Product Variant Sync Quantities 2751-Inch Riflescope Rings0Add Quantity For Product VariantSync Quantities 29030mm & 35mm Precision Matched Scope Rings-2Add Quantity For Product VariantSync Quantities 27430mm Riflescope Rings-2Add Quantity For Product VariantSync Quantities 312Bino HUB Binocular System-23Add Quantity For Product VariantSync Quantities 276Bubble Level-7Add Quantity For Product VariantSync Quantities 240Comfort Strap0Add Quantity For Product VariantSync Quantities
Stock ID Variant Quantity in Stock Edit Delete
9 Model: Comfort Strap (Regular)
0 Edit Quantity Delete Variant
10 Model: Comfort Strap (Compact)
0 Edit Quantity Delete Variant
186Crossfire-1Add Quantity For Product VariantSync Quantities
Stock ID Variant Quantity in Stock Edit Delete
6 Model: 8 x 42
0 Edit Quantity Delete Variant
218Crossfire Riflescope-6Add Quantity For Product VariantSync Quantities
Stock ID Variant Quantity in Stock Edit Delete
23 Model: 1 Inch Tube 3.5-10x50 V-Plex
1 Edit Quantity Delete Variant
325Curl Combo Pack0Add Quantity For Product VariantSync Quantities 238Custom Molded Case0Add Quantity For Product VariantSync Quantities 185Diamondback-8Add Quantity For Product VariantSync Quantities
Stock ID Variant Quantity in Stock Edit Delete
16 Model: 10 x 50
1 Edit Quantity Delete Variant
17 Model: 10 x 42
0 Edit Quantity Delete Variant
27 Model: 7 x 36
0 Edit Quantity Delete Variant
217Diamondback Riflescope-25Add Quantity For Product VariantSync Quantities
Stock ID Variant Quantity in Stock Edit Delete
19 Model: 1 Inch Tube 4-12x40 BDC
-3 Edit Quantity Delete Variant
20 Model: 1 Inch Tube 2-7x35 BDC
1 Edit Quantity Delete Variant
320Drop Tine Deluxe0Add Quantity For Product VariantSync Quantities 317Forky Day Pack0Add Quantity For Product VariantSync Quantities 329Full Curl Bag0Add Quantity For Product VariantSync Quantities 326Full Curl Pack0Add Quantity For Product VariantSync Quantities 328Full Curl System0Add Quantity For Product VariantSync Quantities 184Fury-5Add Quantity For Product VariantSync Quantities
Stock ID Variant Quantity in Stock Edit Delete
18 Model: 10 x 42
1 Edit Quantity Delete Variant
316G2 Day Pack0Add Quantity For Product VariantSync Quantities 323G2 MAQ Quiver Pack0Add Quantity For Product VariantSync Quantities 314G3 MAQ Quiver Pack0Add Quantity For Product VariantSync Quantities 315G3 Tree Stand Pack0Add Quantity For Product VariantSync Quantities 286Hurricane R/T0Add Quantity For Product VariantSync Quantities 327Hybrid Curl Frame0Add Quantity For Product VariantSync Quantities 195Impact-1Add Quantity For Product VariantSync Quantities 277killFLASH® ARD-1Add Quantity For Product VariantSync Quantities 279killFLASH® ARD for StrikeFire & SPARC0Add Quantity For Product VariantSync Quantities 278killFLASH® ARD Threaded0Add Quantity For Product VariantSync Quantities 310Main Beam-1Add Quantity For Product VariantSync Quantities 311Main Beam XL0Add Quantity For Product VariantSync Quantities 194Nomad-13Add Quantity For Product VariantSync Quantities 259Nomad ScopeSkin-9Add Quantity For Product VariantSync Quantities
Stock ID Variant Quantity in Stock Edit Delete
26 Model: Small Angled
2 Edit Quantity Delete Variant
319Ranger Optic Holster0Add Quantity For Product VariantSync Quantities 188Raptor0Add Quantity For Product VariantSync Quantities 182Razor-3Add Quantity For Product VariantSync Quantities
Stock ID Variant Quantity in Stock Edit Delete
15 Model: 10 x 42
1 Edit Quantity Delete Variant
303Razor HD-1Add Quantity For Product VariantSync Quantities 191Razor HD-18Add Quantity For Product VariantSync Quantities
Stock ID Variant Quantity in Stock Edit Delete
21 Model: Razor HD 20-60x85 Angled
-4 Edit Quantity Delete Variant
263Razor HD 35mm Rings-1Add Quantity For Product VariantSync Quantities 262Razor HD Riflescope-2Add Quantity For Product VariantSync Quantities 282Recon R/T Tactical Scopes0Add Quantity For Product VariantSync Quantities 283Recon R/T Tactical Scopes with VMS0Add Quantity For Product VariantSync Quantities 237Replacement Tethered Caps-1Add Quantity For Product VariantSync Quantities 193Skyline-1Add Quantity For Product VariantSync Quantities 192Skyline ED-4Add Quantity For Product VariantSync Quantities 260Skyline ScopeSkin-24Add Quantity For Product VariantSync Quantities 321SlingShot0Add Quantity For Product VariantSync Quantities 324SlingShot MAQ Pack0Add Quantity For Product VariantSync Quantities 233SnipePod V2 27"-15Add Quantity For Product VariantSync Quantities 232Snipepod V2 30"-23Add Quantity For Product VariantSync Quantities 202Solo0Add Quantity For Product VariantSync Quantities
Stock ID Variant Quantity in Stock Edit Delete
22 Model: Solo 8 x 25
1 Edit Quantity Delete Variant
322Spike Fanny Pack0Add Quantity For Product VariantSync Quantities 219Strikefire AR-15 Flat Top Red/Green Dot Scope (High Mount)-12Add Quantity For Product VariantSync Quantities 220Strikefire Hunting Red/Green Dot Scope (Low Mount)-9Add Quantity For Product VariantSync Quantities 284Talon HD-7Add Quantity For Product VariantSync Quantities 234Tripod Replacement Plates3Add Quantity For Product VariantSync Quantities
Stock ID Variant Quantity in Stock Edit Delete
25 Model: High Country Quick Release Plate
5 Edit Quantity Delete Variant
318Typical 7-Pocket0Add Quantity For Product VariantSync Quantities 189Vanquish-1Add Quantity For Product VariantSync Quantities 183Viper-16Add Quantity For Product VariantSync Quantities
Stock ID Variant Quantity in Stock Edit Delete
12 :
4 Edit Quantity Delete Variant
13 :
1 Edit Quantity Delete Variant
307Viper-1Add Quantity For Product VariantSync Quantities 304Viper HD-17Add Quantity For Product VariantSync Quantities 306Viper HD-3Add Quantity For Product VariantSync Quantities 305Viper HS0Add Quantity For Product VariantSync Quantities 289Viper PST-4Add Quantity For Product VariantSync Quantities 216Viper Riflescope-19Add Quantity For Product VariantSync Quantities
Stock ID Variant Quantity in Stock Edit Delete
11 Model: 1 Inch Tube 4-12x40 BDC
1 Edit Quantity Delete Variant
222Viper Sun Shade-2Add Quantity For Product VariantSync Quantities
Stock ID Variant Quantity in Stock Edit Delete
24 Model: Viper 50mm
1 Edit Quantity Delete Variant
248Vortex Competition Shirt0Add Quantity For Product VariantSync Quantities 249Vortex Hoodie - Green0Add Quantity For Product VariantSync Quantities 247Vortex Long Sleeve Shirt - Camo0Add Quantity For Product VariantSync Quantities 250Vortex Polo - Brown-1Add Quantity For Product VariantSync Quantities 251Vortex Polo - Grey-1Add Quantity For Product VariantSync Quantities 252Vortex T-Shirt - Strikefire0Add Quantity For Product VariantSync Quantities 285Vulture HD0Add Quantity For Product VariantSync Quantities

Any ideas?
Thanks,
VIP Optics

11 Oct 2011, 11:28 AM
#1320
ces avatar

ces

Zen Follower

Join Date:
Nov 2004
Location:
West Mids, England
Posts:
199
Plugin Contributions:
0

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

CES:

I must say I'm having exactly the same problem. Going to read up some more.

Further information, I used Athena's code and it is now working fine. :-)

Slight problem I had with one of my items showing out of stock when they were in stock for all variations. I deleted them all and inserted new variations individually, not 'all at once' and it seems to have worked!