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

Results 521 to 540 of 3,609
16 Oct 2008, 7:49 PM
#521
redcinamn avatar

redcinamn

Zen Follower

Join Date:
Oct 2006
Posts:
175
Plugin Contributions:
0

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

Here is my question has anyone developed a script that will automatically disable the attribute (such as Size 4) when the item is sold out?

So example: Size 2 (+4)
Size 4 (+2)
Size 6 (sold out) or remove the attribute all together
Size 8 (+2)

~Renee

18 Oct 2008, 1:33 AM
#522
hornslongtx avatar

hornslongtx

New Zenner

Join Date:
Sep 2008
Posts:
4
Plugin Contributions:
0

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

Ok, I know this has already been covered in this thread somewhere, but I can't read through 50 pages to find it.

I am having trouble installing the mod. I think the problem comes from the renaming files portion or possibly the uploading. So, I will ask about both.

In the instructions is says to rename 2 files. Now, the second one was easy the name of the file was YOUR_CART just like in the instructions. The first was not. It says to rename includes/modules/YOUR_TEMPLATE but the file path is includes/modules/pages. Why would I rename "pages" which is in my directory to the name of my template (which is custom, btw)?

This does not make sense to me.

Second, I am using a net Ftp to make changes. Can anyone do a basic run through of the best way to upload this mod?

Thank you

20 Oct 2008, 8:05 PM
#523
raimond avatar

raimond

Zen Follower

Join Date:
Jul 2004
Location:
The Netherlands, Wierden
Posts:
423
Plugin Contributions:
0

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

wonderfull contribution but there is one problem....I cant delete a variant

So when i use multiple options the stock will be count double...

How can i delete a variant?

Problem solved
In english the product variant can be deleted. in my default language not...so i will check my default language

20 Oct 2008, 9:21 PM
#524
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

ldop:

Fatal error: Cannot redeclare class order in /home/www/slune.eu/subdomeny/www/includes/classes/order.php on line 1069

Can you give a hint where can be the problem?Either you, or your FTP program have left a backup copy of the orders class alongside your amended version. There are a number of posts earlier in the thread that explain the problems that this can cause.

20 Oct 2008, 9:25 PM
#525
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

naturalolive:

Hi there,

I too, am having a problem. I am running 1.3.6 and have just added a product with 6 attribute variables.

http://www.naturalpod.com/shop/index.php?main_page=product_info&cPath=65&products_id=926

Each attribute has approx 6-7 options. Does someone know a fast way to set the quantity to say 999 for each variable. The amount of combinations/permutations to do it one by one would take forever.I'm puzzled. If you're going to set the stock to a high value for all variants, I can't see any benefit in setting it at all at attribute level. Why not just put a high value on the product and "manage" stock at product level.

20 Oct 2008, 9:37 PM
#526
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

Redcinamn:

Here is my question has anyone developed a script that will automatically disable the attribute (such as Size 4) when the item is sold out?I doubt it. This would be of limited use beyond the case where every product had just one attribute, and heaps more complicated to generalize to multiple attributes per product. This is the sort of thing that would normally be written for a specific situation where the limitations of what is needed are well-defined and understood.

20 Oct 2008, 9:40 PM
#527
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

raimond:

Problem solvedwell done. :thumbsup:

23 Oct 2008, 1:36 PM
#528
megadood avatar

megadood

New Zenner

Join Date:
Jan 2008
Posts:
22
Plugin Contributions:
0

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

Hiya,

First of all this looks like a great product, thanks for developing and supporting it!

My Query:
Is it possible for customised attributes to be automatically applied to all products in a specific category?

For example

I have a category of hats
within this category every product i create will have a custom attribute of size with a drop down choice from 53 to 60.

I will also have a second attribute setup for hat colour with options red green blue etc...

All hat manufacturers will use this size scheme and colour scheme going forward so I will need to copy these attributes to any product i create in a certain cattegory.

Is there a way to make it so that when you add a new product within the hats category, that the two attributes above are automatically added to them?

I can then go in and ammend stock for each size/colour combination after bulk adding a number of different products under the hat category.

I have found the manual way to copy attributes to already created products via category.. but as I am giving end users a cut down admin interface to add their own products, i didnt want them to have this ability for obvious reasons of them accidentally applying attributes in bulk to all their stock...

Thanks

Martin

23 Oct 2008, 2:01 PM
#529
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

megadood:

Is it possible for customised attributes to be automatically applied to all products in a specific category?You're giving this mod way too much credit. All it does is manage stock for product variants. It has no involvement in creating products and adding attributes to them.

6 Nov 2008, 9:57 PM
#530
jdimaging avatar

jdimaging

New Zenner

Join Date:
Nov 2005
Posts:
22
Plugin Contributions:
0

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

I am trying to do my first custom adon and when I import in the mysql file into phpmyadmin it is naming the table using the database name (c-Panel), not just zen_ and therefore I am getting this error.

1146 Table 'sabrina_zc1.zen_products_with_attributes_stock' doesn't exist
in:
[select * from zen_products_with_attributes_stock where products_id="7"]

I have no idea how to edit the sql so that it does not use the database name.

This is the table for the database.

CREATE TABLE products_with_attributes_stock (
stock_id INT NOT NULL AUTO_INCREMENT ,
products_id INT NOT NULL ,
stock_attributes VARCHAR( 255 ) NOT NULL ,
quantity INT NOT NULL ,
PRIMARY KEY ( stock_id )
)
;

INSERT INTO configuration (configuration_title, configuration_key, configuration_value,
configuration_description, configuration_group_id, sort_order,
last_modified, date_added, use_function, set_function)
VALUES ('Show Attributes Stock', 'PRODUCT_STOCK_ATTRIBUTE_SHOW', 'true',
'Show the stock of items that have stock set by attributes?', '1', '500', NULL,
now(), NULL, "zen_cfg_select_option(array('true', 'false'),");

UPDATE configuration SET configuration_value = "false" WHERE configuration_key = "STOCK_ALLOW_CHECKOUT";

Any input would be appreciated, thanks.

8 Nov 2008, 1:41 AM
#531
bigbadboy avatar

bigbadboy

Totally Zenned

Join Date:
Apr 2008
Location:
London
Posts:
557
Plugin Contributions:
0

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

Using 1.3.8a and latest SbA and have a small error.

Admin > catalog > products with attributes stock
Click > 'Add quantity for product variant'
Size (only attribute) - 'All'
Quantity - Any number

Hit 'Submit'

I then get this error:
att: 41|42|43|44|45|46

Warning: Cannot modify header information - headers already sent by (output started at /home/path/to/products_with_attributes_stock.php:193) in /home/path/to/admin/includes/functions/general.php on line 21

Line 193 - echo "att: $attributes<bR>\n";
Line 21 - header('Location: ' . $url);

I thought maybe the R in bR was wrong (line break?) but changing it made no difference.

Thing is, although this error occurs hitting back button and accessing 'Admin > catalog > products with attributes stock' again shows the options updated correctly.

Other than that everything works perfect.

Any suggestions to get rid of the error before I show to the client?

8 Nov 2008, 2:00 AM
#532
bigbadboy avatar

bigbadboy

Totally Zenned

Join Date:
Apr 2008
Location:
London
Posts:
557
Plugin Contributions:
0

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

Just as an update ...
I think the error might be caused by the fact that I have an attribute:
'Size: Select Size:' <- This attribute is read only but still gets assigned a stock level.

Just a thought.

10 Nov 2008, 12:23 AM
#533
stog avatar

stog

New Zenner

Join Date:
Aug 2008
Posts:
4
Plugin Contributions:
0

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

I just want to say how good i have found this mod but only problem i have is updating the stock levels.
I have seen question about not being able to update than quantity a time.
I am now currently writing my first mod to be able to mass update quantity and stock attributes.
I have not writing a mod before so am asking for best advice how to go about it.
I know that this feature will be incorporated in new version of Zencart but I need this now as I sell stock more that 1 venue and have to update stock regularly.
Any help and advice would appreciated.
Once done I will gladly upload for all to use.

10 Nov 2008, 12:42 AM
#534
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

jdimaging:

I am trying to do my first custom adon and when I import in the mysql file into phpmyadmin it is naming the table using the database name (c-Panel), not just zen_ and therefore I am getting this error.

1146 Table 'sabrina_zc1.zen_products_with_attributes_stock' doesn't exist
in:
[select * from zen_products_with_attributes_stock where products_id="7"]It's absolutely normal for the database name to be used as well as the table name, otherwise your MySQL server would be unable to differentiate between Zen Carts on the same server.

The problem would be either than your configure files point to a non-existent database (which seems unlikely) or that you didn't edit your database prefix into the installation SQL before running it as per the installation instructions, so that the table has been created with the wrong name. You will be able to see and correct this via phpMyAdmin.

10 Nov 2008, 12:44 AM
#535
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

bigbadboy:

Using 1.3.8a and latest SbA and have a small error.

Admin > catalog > products with attributes stock
Click > 'Add quantity for product variant'
Size (only attribute) - 'All'
Quantity - Any number

Hit 'Submit'

I then get this error:
att: 41|42|43|44|45|46

Warning: Cannot modify header information - headers already sent by (output started at /home/path/to/products_with_attributes_stock.php:193) in /home/path/to/admin/includes/functions/general.php on line 21Answered a little earlier in this thread.

10 Nov 2008, 12:55 AM
#536
bigbadboy avatar

bigbadboy

Totally Zenned

Join Date:
Apr 2008
Location:
London
Posts:
557
Plugin Contributions:
0

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

thanks kuroi I missed that reply.

10 Nov 2008, 1:01 AM
#537
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

bigbadboy:

thanks kuroi I missed that reply.Easy to do given the length of the thread. I find that searching via Google on error messages is a quick way of cutting through the tons of info to finding answers when there are error messages.

The trick is to identify information that is specific to the problem, but not your setup. In this case the following search string would take you there very quickly> site:zen-cart.com products_with_attributes_stock.php:193

13 Nov 2008, 5:25 PM
#538
internetkev avatar

internetkev

New Zenner

Join Date:
Nov 2007
Location:
Los Angeles, CA
Posts:
1
Plugin Contributions:
0

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

I was hoping there was a simple solution to what I hope is a simple problem.

  1. "Stock by Attribute" module is installed and working fine on a Zen-Cart clothing store site.
  2. We'd like it if a products out-of-stock options were not displayed on the product page -- we'd like the customer to not see a temporarily out of stock option listed.

I believe the option stock check would happen during the option array formation.

Any suggestions would be very appreciated! :smile:

17 Nov 2008, 1:00 AM
#539
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

InternetKev:

[*]We'd like it if a products out-of-stock options were not displayed on the product page -- we'd like the customer to not see a temporarily out of stock option listed.What settings do you have on your Admin > Configuration > Stock page?

18 Nov 2008, 3:01 PM
#540
dunk avatar

dunk

Zen Follower

Join Date:
Dec 2007
Location:
London
Posts:
184
Plugin Contributions:
0

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

Thanks for a great mod!

I'm using drop downs for my attributes, in this case 4 options for different coloured card.
If one particular colour of card is out of stock is it possible to display this next to the attribute in the drop down menu, eg:

Please Select Your Colour
Red
Orange (OUT OF STOCK)
Green
Pink

Thanks in advance!

Dunc