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

Results 661 to 680 of 3,609
22 May 2009, 6:13 PM
#661
jazzyp avatar

jazzyp

New Zenner

Join Date:
Feb 2009
Location:
UK
Posts:
29
Plugin Contributions:
0

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

kuroi:

No luck wished (shouldn't be necessary), just advice ...

  1. ensure that your old includes/classes/order.php file gets over-written by the new one (sometimes FTP tools don't over-write files that are already there)
  1. check that you have your stock settings configured both to check stock and to prevent checkout if its too low (Admin > Configuration > Stock Settings)
  1. don't leave any backups sitting around in your classes folder (sometimes FTP tools create these automatically)

Right, I've deleted all the SBA multiadd files and uploaded them again. I used winmerge to check the contents of each file against clean Zen files. The only thing I haven't done is touch the database.

And - it's still not working. Checkout works normally for stock items that don't use attributes, but any attribute items will checkout regardless of stock levels. The warning appears on the shopping cart page but it still lets you checkout.

Am I just going to have to live with it!?

26 May 2009, 2:01 PM
#662
esugrue avatar

esugrue

Zen Follower

Join Date:
Jun 2004
Posts:
182
Plugin Contributions:
0

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

Hi!

I may have the same issue as jazzyp, I downloaded the latest version 4.7AJAX and have set the stock to Subtract and Not Allow Checkout.

It doesn't allow Checkout but after I checkout and look the stock has not subtracted.

I also looked in the files included and couldn't find the required order.php, in fact no directory for classes just admin, ajax and includes (but no classes under includes).

Should I be able to download this version:
Author: mcinallym
Version: 4.7MULTIADD
Zen Cart™ Version: v1.3.8

and just install it etc?

26 May 2009, 4:19 PM
#663
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

Jazzyp:

Right, I've deleted all the SBA multiadd files and uploaded them again. I used winmerge to check the contents of each file against clean Zen files. The only thing I haven't done is touch the database.

And - it's still not working. Checkout works normally for stock items that don't use attributes, but any attribute items will checkout regardless of stock levels. The warning appears on the shopping cart page but it still lets you checkout.

**Am I just going to have to live with it!?**If you are using the MultiAdd version, then the answer is yes.. It will warn the customer that the item is out of stock, but it will allow them to checkout..

I'm subscribed top this thread to keep up with updates on this add-on, and color me silly, but I finally today realized that the AJAX version being discussed of late was indeed a new versionof this add-on (I know.. pardon the blonde moment:laugh:) Sounds like the Ajax version is supposed to prevent checkout, but doesn't adjust stock levels correctly (bummer:().

I wasn't clear, but it sounds like merging the MultiAdd version with the Ajax version didn't work. Did I read that wrong??

I wonder if the author of the Ajax version is aware that his version doesn't work.. Hmmmm

27 May 2009, 7:44 PM
#664
flowerchild5 avatar

flowerchild5

New Zenner

Join Date:
Mar 2009
Posts:
31
Plugin Contributions:
0

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

I am having a problem with attribute/variant inventory being updated. It is still updating inventory on a products level versus the attribute level.

I am using vers. 4.7 vanilla I have....

  1. verified all of the files uploaded correctly including the includes/classes/order.php
  2. I have Configuration -> Stock ->
    Check stock level true
    Subtract stock true
    Allow Checkout false

I am using "Fast and Easy Checkout" but apparently that mod does not conflict with this mod because limelites was able to get his inventory to update with the same mod installed.

I read where there was an "attribute stock exceeded" check is missing from "includes/modules/pages/checkout/header_php.php". This file is unique to the "Fast and Easy Checkout" contribution. I made these changes as was suggested and it does does give a warning that stock is low for the particular attribute that was added to the cart, but yet still does not decrement the attribute stock levels.

The only other mod that I can think of that would possibly interfere is the "product attributes grid" mod. There are plenty of people with that mod that are not having conflicts so I am thinking this is not the problem.

Any suggestions?

27 May 2009, 8:29 PM
#665
flowerchild5 avatar

flowerchild5

New Zenner

Join Date:
Mar 2009
Posts:
31
Plugin Contributions:
0

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

After a week now of trying to get the attribute inventory to update correctly I have found out the problem though I don't have a solution to it yet.

It is indeed the "attribute grid" mod that is causing the problem. With this particular mod it is required that you create another attribute for each product. I have the option size with the various sizes as values. In order for the attributes to layout in a grid. You must use another attribute. This I used quantity with no value.

Does anybody no of a work around to this? I will work on it tonight and hopefully come up with something, but I was hoping someone might have run into this problem already.

Is this what I am looking for (a hack to exclude readonly attributes) as Kuroi had suggested to another Zenner http://www.zen-cart.com/forum/showthread.php?p=482137#post482137

If so where would I put this code in the file admin/includes/classes/products_with_attributes_stock.php The post was way back in '07 not sure if it would work with 1.38 and this version of SBA

28 May 2009, 1:48 PM
#666
flowerchild5 avatar

flowerchild5

New Zenner

Join Date:
Mar 2009
Posts:
31
Plugin Contributions:
0

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

I was thinking I could only select only the attributes from the database that have an option value since my 2nd attribute does not have a value and is only present to create another axis for the attribute grid.
......couldn't figure this out

I then thought that I could filter the attributes to retrieve only attributes where its option value id was NOT 110 or option id was NOT 20 as these are unique to this particular attribute. I am just not seeing this code where the attributes are retrieved from the the products_attributes table.

Any ideas oh wise Zenners?

28 May 2009, 5:14 PM
#667
jazzyp avatar

jazzyp

New Zenner

Join Date:
Feb 2009
Location:
UK
Posts:
29
Plugin Contributions:
0

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

DivaVocals:

If you are using the MultiAdd version, then the answer is yes.. It will warn the customer that the item is out of stock, but it will allow them to checkout..

I wasn't clear, but it sounds like merging the MultiAdd version with the Ajax version didn't work. Did I read that wrong??

Yes, you read it right. I combined the files from both multiadd and ajax and it still didn't work.

28 May 2009, 5:15 PM
#668
jazzyp avatar

jazzyp

New Zenner

Join Date:
Feb 2009
Location:
UK
Posts:
29
Plugin Contributions:
0

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

flowerchild5:

After a week now of trying to get the attribute inventory to update correctly I have found out the problem though I don't have a solution to it yet.

It is indeed the "attribute grid" mod that is causing the problem. With this particular mod it is required that you create another attribute for each product. I have the option size with the various sizes as values. In order for the attributes to layout in a grid. You must use another attribute. This I used quantity with no value.

Does anybody no of a work around to this? I will work on it tonight and hopefully come up with something, but I was hoping someone might have run into this problem already.

Is this what I am looking for (a hack to exclude readonly attributes) as Kuroi had suggested to another Zenner http://www.zen-cart.com/forum/showthread.php?p=482137#post482137

If so where would I put this code in the file admin/includes/classes/products_with_attributes_stock.php The post was way back in '07 not sure if it would work with 1.38 and this version of SBA

Not sure if it is the attribute grid mod that's causing the problem, as I don't use that mod and I have the problem! :(

28 May 2009, 5:33 PM
#669
flowerchild5 avatar

flowerchild5

New Zenner

Join Date:
Mar 2009
Posts:
31
Plugin Contributions:
0

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

Jazzyp:

Not sure if it is the attribute grid mod that's causing the problem, as I don't use that mod and I have the problem! :(

In my case it definitely was the product attribute grid mod. When I disable it attribute inventory works fine.

29 May 2009, 3:53 PM
#670
g_nencini avatar

g_nencini

Zen Follower

Join Date:
Mar 2006
Location:
Florence, Italy
Posts:
153
Plugin Contributions:
0

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

I'm studying how to interface the zen database with a sophisticated program managing the store of a dress factory. I've installed the stock_by_attributes_4-7ajax module, and I begun to consider the color and the size of a dress.

The table products_with_attributes_stock contains the fields
stock_id,
products_id,
stock_attributes,
quantity

and in my test I've the values

(1, 9, '2,7', 11),
(2, 9, '3,5', 12),
(3, 9, '4,5', 13),
(4, 9, '3,6', 14),
(5, 9, '3,8', 15),
(6, 9, '1,6', 16),
(7, 9, '4,8', 0);

The first row tell me that the dress with the product_id=9 has a attribute combination of '2,7', and there are 11 dresses in stock.
Again in my example I have

2 = Grey 7 = size 44

The problem is that the number 2 is not the attribute identificator, but the position in the drop-down menu of the colors. The same thing is for the number 7.

The possibility to update the table from another program seems to be really very complicated!!!

Ha someone dealed with this problem and can give me some suggestion?

Thanks - Giovanni

29 May 2009, 5:36 PM
#671
ferid avatar

ferid

New Zenner

Join Date:
Jun 2005
Posts:
65
Plugin Contributions:
0

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

I installed the stock_by_attributes_v4_7 (zc 1.38).
But as soon as I edit a product, the product description gets deleted.
I also tried the ajax and multiadd. All give me the same problems.
Anyone know how this is possible?

29 May 2009, 6:54 PM
#672
flowerchild5 avatar

flowerchild5

New Zenner

Join Date:
Mar 2009
Posts:
31
Plugin Contributions:
0

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

flowerchild5:

After a week now of trying to get the attribute inventory to update correctly I have found out the problem though I don't have a solution to it yet.

It is indeed the "attribute grid" mod that is causing the problem. With this particular mod it is required that you create another attribute for each product. I have the option size with the various sizes as values. In order for the attributes to layout in a grid. You must use another attribute. This I used quantity with no value.

Does anybody no of a work around to this? I will work on it tonight and hopefully come up with something, but I was hoping someone might have run into this problem already.

Is this what I am looking for (a hack to exclude readonly attributes) as Kuroi had suggested to another Zenner http://www.zen-cart.com/forum/showthread.php?p=482137#post482137

If so where would I put this code in the file admin/includes/classes/products_with_attributes_stock.php The post was way back in '07 not sure if it would work with 1.38 and this version of SBA

Problem solved! Product attributes Grid has a new version now that does not conflict with Stock By Attributes

31 May 2009, 3:26 AM
#673
swamyg1 avatar

swamyg1

Zen Follower

Join Date:
Dec 2008
Location:
San Fran
Posts:
382
Plugin Contributions:
0

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

Does anybody know how to disable the checking of stock for one particular product? I need to create a special order product that users can configure unlimited attributes for, even attributes that I don't have in stock. In other words, customers should be able to order this product even if it's not in stock.

Does anybody know of an easy way to do this?

31 May 2009, 5:43 AM
#674
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

swamyg1:

Does anybody know how to disable the checking of stock for one particular product? I need to create a special order product that users can configure unlimited attributes for, even attributes that I don't have in stock. In other words, customers should be able to order this product even if it's not in stock.

Does anybody know of an easy way to do this?Make the number in stock some outrageously large number that the product will never be out of stock any time soon..

2 Jun 2009, 6:50 AM
#675
g_nencini avatar

g_nencini

Zen Follower

Join Date:
Mar 2006
Location:
Florence, Italy
Posts:
153
Plugin Contributions:
0

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

I've installed also the dynamic_drop_downs_for_stock_by_attributes, and the situation is changed, so that now I can give some suggestions.

Consider a dress named 'Anais' with two or more ORDERED attribuTES, for example
first -> the size
second -> the color
and that we have values for that attributes created via admin.

To buid an external program for modifying the quantities we can:

  1. From the TABLE products_description create an array
    with all the products_id and products_name of the products.
    With the products_id we'll make a foreach to examine all the
    products (in english -> second field=1)

(9,1, 'Anais', '', '', 55),
products_id = 9
products_name = Anais

  1. From TABLE products_attributes create an hash (**)
    containing the values of products_attributes_id,
    options_id and options_values_id related to the
    current products_id.

(15, 9, 1, 15, ....
(14, 9, 1, 8, ....
(9, 9, 2, 32, ....
(10, 9, 2, 33, ....
(11, 9, 2, 34, ....
(12, 9, 2, 35, ....
(13, 9, 1, 3, ....
(16, 9, 1, 27, ....

products_id=9 , options_id=1, options_values_id=15
products_id=9 , options_id=1, options_values_id=8
products_id=9 , options_id=2, options_values_id=32
products_id=9 , options_id=2, options_values_id=33
products_id=9 , options_id=2, options_values_id=34
products_id=9 , options_id=2, options_values_id=35
products_id=9 , options_id=1, options_values_id=3
products_id=9 , options_id=1, options_values_id=27

  1. From TABLE products_with_attributes_stock create an
    hash containing for all the products_id the values of
    stock_attributes e quantity.

(11, 9, '10,15', 14),
(10, 9, '9,16', 13),
(9, 9, '9,15', 12),
(8, 9, '11,14', 11),
(12, 9, '12,15', 15),
(13, 9, '10,13', 16),
(14, 9, '12,16', 0);

products_id=9, stock_attributes='10,15', quantity=14
products_id=9, stock_attributes='9,16' , quantity=13
products_id=9, stock_attributes='9,15' , quantity=12
products_id=9, stock_attributes='11,14', quantity=11
products_id=9, stock_attributes='12,15', quantity=15
products_id=9, stock_attributes='10,13', quantity=16
products_id=9, stock_attributes='12,16', quantity=0

  1. For each element of the hash, by an 'explode'
    separate the two numbers of the stock_attributes,
    remembering that the first number is related to the
    size (products_options_id = 1), the second to the color,
    (products_options_id = 2) and so on.

'10,15' -> 10==Size 15==Color

  1. With the first number point to the hash (**) ed estract
    the value of options_values_id.

(10, 9, 2, 33, ....
products_id=9 , options_id=2, options_values_id=33

  1. With the value of options_values_id estract from
    TABLE products_options_values the descrition of the
    size, (in english -> second field=1)

.....................
(32, 2, 'Taglia 40', 20),
(32, 1, 'Size 40', 20),
(33, 2, 'Taglia 42', 30),
(33, 1, 'Size 42', 30), <--------
(34, 2, 'Taglia 44', 40),
(34, 1, 'Size 44', 40),
.....................

  1. Make tha same thing with the secon number obtaining the
    description of the color.

(15, 9, 1, 15, ....
products_id=9 , options_id=1, options_values_id=15

.....................
(14, 2, 'Moro', 140),
(14, 1, 'Dark', 140),
(15, 2, 'Nero', 150),
(15, 1, 'Black', 150), <--------
(16, 2, 'Nero e bianco', 160),
(16, 1, 'Black and white', 160),
.....................

  1. Now we have all the data to show the product on the screen
    for modifying the value of 'quantity'.

  2. Continue for all the element of the hash related
    to the TABLE products_with_attributes_stock and then
    continue with the next products_id of the foreach.

Giovanni

2 Jun 2009, 8:26 AM
#676
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

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

DivaVocals:

Make the number in stock some outrageously large number that the product will never be out of stock any time soon..Exactly. If you're using the vanilla version of 4.7, don't set any stock for the attribute combinations and it will default to product level stock, then make that a very big number and it won't matter whether it checks stock or not.

The alternative is to start hacking the order class to exempt the specific product from stock checking, but I wouldn't recommend that.

2 Jun 2009, 8:39 AM
#677
skybluepunk avatar

skybluepunk

New Zenner

Join Date:
Oct 2008
Posts:
28
Plugin Contributions:
0

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

Does anyone know if it's possible to run the Ollacart POS system with Stock by Attributes?

Ollacart POS looks like a great solution for keeping the ZC database updated with physical store sales, but our store relies heavily on Stock by Attributes.

It seems that Ollacart doesn't work at attribute level by default, but is it possible to make it work?

Or is there an alternative POS which works?

3 Jun 2009, 11:45 AM
#678
rhlee avatar

rhlee

New Zenner

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

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

Hi guys,

I know this is cross posting (see http://www.zen-cart.com/forum/showpost.php?p=736416&postcount=713), but I didn't know how to contribute back to the PWA codebase. I think I found a bug with michael mcinally's ALL attributes addition.

Line 244 in products_with_attributes_stock.php

$strAttributes = implode(",", $arrNew[$i]);

should be

sort($arrNew[$i]);
$strAttributes = implode(",", $arrNew[$i]);

Otherwise the attribute ids don't appear in order when you do the ALL thingy. When not in order Zen Cart cant match the attribute combination and marks all variations of the product as out of stock.

3 Jun 2009, 2:36 PM
#679
swamyg1 avatar

swamyg1

Zen Follower

Join Date:
Dec 2008
Location:
San Fran
Posts:
382
Plugin Contributions:
0

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

kuroi:

Exactly. If you're using the vanilla version of 4.7, don't set any stock for the attribute combinations and it will default to product level stock, then make that a very big number and it won't matter whether it checks stock or not.

The alternative is to start hacking the order class to exempt the specific product from stock checking, but I wouldn't recommend that.

I did this but it's still not working right. I set the stock to 10000 on the product level, the add to cart button displays fine but no attributes are displayed at all. Here's a link

3 Jun 2009, 8:30 PM
#680
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

swamyg1:

I did this but it's still not working right. I set the stock to 10000 on the product level, the add to cart button displays fine but no attributes are displayed at all. Here's a link:laugh: WAY Off Topic.. But this is one of my client's favorite vendors..