Forums / All Other Contributions/Addons / Stock For Product With Different Attributes (OLD)

Stock For Product With Different Attributes (OLD)

Locked

Started by dafonz on 30 Nov 2005, 8:52 PM · Views: 80,867

Results 221 to 240 of 273
This thread is locked. New replies are disabled.
14 Mar 2006, 8:20 PM
#221
ringy avatar

ringy

New Zenner

Join Date:
Dec 2005
Posts:
62
Plugin Contributions:
0

Stock For Product With Different Attributes (OLD)

Pretty sure I already posted the no_confirm mod here
Found it.....here's s_mack's contrib in case anyone else is looking for it:- Page 23 for s_mack's original contribution
Page 24 for jettrue's small error correctionWorks a treat - thanks Steven! ::tup

I think I'll stick with this for now, but if anyone can point me to the Excel guide then I'd really appreciate it :)

Cheers!

14 Mar 2006, 9:57 PM
#222
yanker avatar

yanker

New Zenner

Join Date:
Mar 2006
Posts:
1
Plugin Contributions:
0

Re: Stock For Product With Different Attributes (OLD)

Just wanted to see if anyone has a suggestion for a case where I have certain products of unlimited quantity with about 200 attributes. It's a candle site and the candles are made to order so we don't need to list a quantity for each scent - it is unlimited. I don't really want to create a new entry for each one with quantity of 1,000,000 or something. Seems like there's got to be a way to have it ignore stock for certain items/attributes. Any thoughts?

14 Mar 2006, 11:51 PM
#223
ringy avatar

ringy

New Zenner

Join Date:
Dec 2005
Posts:
62
Plugin Contributions:
0

Re: Stock For Product With Different Attributes (OLD)

I have certain products of unlimited quantity with about 200 attributes
Can you categorise the attributes (or variants) at all? I know nothing about scented candles :huh: but guess that you could break the variants down into some sort of "tree structure"?

If so, then you could use this contribution with a series of drop down lists (although I use only single attribute variants, so may be talking a load of bull!).

14 Mar 2006, 11:59 PM
#224
ringy avatar

ringy

New Zenner

Join Date:
Dec 2005
Posts:
62
Plugin Contributions:
0

Re: Stock For Product With Different Attributes (OLD)

I have now got this contribution working just how I want it, apart from one thing....

If a customer hits the Add to Cart button without selecting an attribute the product appears in the Cart as a "plain" product. This is a problem for me as all my products have to have the attribute selected (eg size, colour, etc.).

I have tried setting default attributes (ie pre-selected choice), but this can only lead to the customer ordering the wrong variant (size, etc.) without realising.

Therefore, is it possible to generate a pop-up error if an attribute has not been selected?

Alternatively, is it possible to create an Add to Cart button for each attribute variant? For example, list a product by size - with an Add to Cart button next to Small, Medium, Large, etc. That way, they hit the button for the size they want.

Any advice most welcome :D

15 Mar 2006, 12:02 AM
#225
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Stock For Product With Different Attributes (OLD)

You can add to the Option Values one called something like:

Select from below ...
Pick one:
Make a choice ...
What do you want?
etc.

The set it for Sort Order 0, Default and Display Only

What this means is the customer must chose any Option Value except this one or they cannot add the product to the cart ... tricky eh? :)

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

15 Mar 2006, 2:07 PM
#226
seizer avatar

seizer

New Zenner

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

Re: Stock For Product With Different Attributes (OLD)

yanker:

Just wanted to see if anyone has a suggestion for a case where I have certain products of unlimited quantity with about 200 attributes. It's a candle site and the candles are made to order so we don't need to list a quantity for each scent - it is unlimited. I don't really want to create a new entry for each one with quantity of 1,000,000 or something. Seems like there's got to be a way to have it ignore stock for certain items/attributes. Any thoughts?
I ahd a similar problem. There were some attributes I did not want to include in my stock count for certain products and there were products I just did not track stock for since they were always available.

I modifed the contrib so that it only includes the attributes that you want for the products that you want.

You can control this behavior through the attributes control panel. I basically added a switch in the panel to either include the attribute in the stock count or ignore it. (Trying to see if there is a way to control the count here too.)

I did have to modfiy some core functions to do this however, but it works like a champ. I am working on packaging it into soemthing readable as it is a lot of hacked code at this point.

As soon as it is ready I will post a link to download.

I came here to learn. I left here wiser.

15 Mar 2006, 8:21 PM
#227
ringy avatar

ringy

New Zenner

Join Date:
Dec 2005
Posts:
62
Plugin Contributions:
0

Re: Stock For Product With Different Attributes (OLD)

Ajeh:

You can add to the Option Values one called something like:

Select from below ...
Pick one:
Make a choice ...
What do you want?
etc.
Thank Ajeh, great idea and would certainly be a suitable solution. However, in my wisdom I have chosen to use a radio list as it gives the customer an instant view of what is in staock and what isn't.

Here is a sample page (sorry, but my site is "under maintenance" at the moment :rolleyes: ).

What would be really cool is an Add to Cart button adjacent to each attribute variant (in place of the radio button), coded so that it adds the chosen attribute to the cart correctly.

This must be possible.....is it?????

15 Mar 2006, 8:36 PM
#228
ringy avatar

ringy

New Zenner

Join Date:
Dec 2005
Posts:
62
Plugin Contributions:
0

Re: Stock For Product With Different Attributes (OLD)

Ok, sorry for another subject, but....

I am now populating all 200+ products with stock-by-attribute.....tedious but essential for the dynamics of my site.

As you can see before, I have modified the Admin > Products With Attributes Stock to remove the confirm step and to pre-populate the entry box (again, nice one Steven!).

So, I thought a good modification to the data entry / data maintenance would benefit from a single page view of the entire product attribute stock. This would only really work for single attribute products and would basically consist of a column list of the attributes, each with a corresponding entry box adjacent to it (column one = attributes list, column two = attributes stock).

I will happily code this up and share it if someone can give me some hints as to where I could find some similar code that has a list of array items with entry boxes by each variant.

A simple pre-populate option will make data maintenance a doddle.

Looking forward to some advice on this...... ::tup

EDIT
Or, how about putting the value box into the Attributes Controller? Again, only of use to single attribute products, but the attribute variants are listed under each product, so why not just have an entry box for stock in that list <_<
(you can't tell I'm getting into the coding can you :D )

20 Mar 2006, 8:21 PM
#229
lbrown avatar

lbrown

New Zenner

Join Date:
Oct 2005
Posts:
16
Plugin Contributions:
0

Re: Stock For Product With Different Attributes (OLD)

I'm having a bit of a problem. See this page for an example (it is live, so don't buy unless you want it) http://www.lenabrown.com/index.php?main_pa...&products_id=24

The attributes are setup with the same name, different values. Each skein of yarn has a different weight and yards. When the buyer makes a choice of one or more, the cart shows the items as out of stock. My stock settings are correct per attribute (1) and the quantity is correct. Is there anywhere else I might have to set something?

Thank you,

Lena Brown Designs

Lena Brown Designs

20 Mar 2006, 9:41 PM
#230
lbrown avatar

lbrown

New Zenner

Join Date:
Oct 2005
Posts:
16
Plugin Contributions:
0

Re: Stock For Product With Different Attributes (OLD)

Alrighty, I figured out the buyer needs to be able to choose two values with the same name.

My store offers yarn and fibers. I would like to list the same skeins of yarn together, but listed at attributes with the same option name. When the buyer makes a choice of which skein to purchase, they should be able to choose more than one option value. When the buyer chooses two or more, the cart only shows one of that item. How can I get the cart to show the number of items based on the boxes checked? I only have one item per attribute value. See my site for an example - the link is in the previous post.

thanks

lbrown

Lena Brown Designs

20 Mar 2006, 10:49 PM
#231
jettrue avatar

jettrue

Totally Zenned

Join Date:
Jan 2005
Location:
USA, St. Louis
Posts:
3,651
Plugin Contributions:
5

Re: Stock For Product With Different Attributes (OLD)

I'm no expert with this contribution, but I think this is the first time someone has mentioned wanted to have checkbox attributes, and allow the customer to choose more than one option. I'm wondering if this is even possible with this?

What I would do, is just do it as a dropdown menu. Then if your customer wants to have both the 138 yard and the 140 yard, then they can just add one to the cart, then add the other to the cart.

21 Mar 2006, 3:44 AM
#232
hobbycache avatar

hobbycache

New Zenner

Join Date:
Jan 2006
Location:
Pleasant Grove, Utah
Posts:
53
Plugin Contributions:
0

Re: Stock For Product With Different Attributes (OLD)

Stock For Product With Different Attributes:

If I have a product that has 5 attribtes and each attribute has between 12 and 20 values. Can I mark this product so it doesn't use this module? Right now if I leave no values on the attributes but I put in a quantity number on the product, when they add to cart it shows out of stock. It doesn't show out of stock on the product listing but when they add to cart it does.

There are hundreds of possible combinations on this that I just can't go through and set a quantity on each item.

Any ideas? Thanks.

Jason Petty

21 Mar 2006, 3:53 AM
#233
s_mack avatar

s_mack

Totally Zenned

Join Date:
Jun 2005
Location:
Kelowna, BC Canada
Posts:
1,033
Plugin Contributions:
4

Re: Stock For Product With Different Attributes (OLD)

Read back through the pages... someone else had the same situation and aparantly solved it.

  • Steven
22 Mar 2006, 4:47 PM
#234
ginar avatar

ginar

New Zenner

Join Date:
Feb 2006
Posts:
83
Plugin Contributions:
0

Re: Stock For Product With Different Attributes (OLD)

I have read the whole thread twice and can't find the answer to a question that was posed on page 5 and I have having the same problem. I get this message
1146 Table 'XXXXX.TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK' doesn't exist.
The table has been set up correctly under zen1_. So I don't know why it is looking for Table XXXXX.

Also, under Catalog I am getting BOX_CATALOG_PRODUCTS instead of Products with Attributes.

When I click on BOX_CATALOG_PRODUCTS I can only see one product in there, when there should be about 100. This is what I see:
1146 Table 'XXXXX.TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK' doesn't exist
Product ID Product Name Quantity of all variants Add Quantity For Product Variant Sync Quantities
41 Flower Pots 999 Add Quantity For Product Variant Sync Quantities

And because the table "does not exist" I am unable to do anything.

Can someone please point me in the right direction. Thanks heaps.

22 Mar 2006, 4:55 PM
#235
s_mack avatar

s_mack

Totally Zenned

Join Date:
Jun 2005
Location:
Kelowna, BC Canada
Posts:
1,033
Plugin Contributions:
4

Re: Stock For Product With Different Attributes (OLD)

In the sql commands that you used, try again without any prefix.

22 Mar 2006, 11:22 PM
#236
ginar avatar

ginar

New Zenner

Join Date:
Feb 2006
Posts:
83
Plugin Contributions:
0

Re: Stock For Product With Different Attributes (OLD)

I am not very familiar with MySQL so sorry I have to ask the question.

By prefix do you mean the
CREATE TABLE [COLOR=red]zen[/COLOR=red]_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 )
)
I remove the word zen. If so, I tried that and still the same problem.

22 Mar 2006, 11:28 PM
#237
s_mack avatar

s_mack

Totally Zenned

Join Date:
Jun 2005
Location:
Kelowna, BC Canada
Posts:
1,033
Plugin Contributions:
4

Re: Stock For Product With Different Attributes (OLD)

That's right, but did you remove the _ too?

get rid of "zen_" not just "zen"

  • Steven
22 Mar 2006, 11:59 PM
#238
ginar avatar

ginar

New Zenner

Join Date:
Feb 2006
Posts:
83
Plugin Contributions:
0

Re: Stock For Product With Different Attributes (OLD)

I tried that, but surely setting up the table without the "zen-" it would not read from the other zen_ tables.

It did not work either.

Copy of catalog_dhtml.php
$za_contents = array();
$za_heading = array('text' => BOX_HEADING_CATALOG, 'link' => zen_href_link(FILENAME_ALT_NAV, '', 'NONSSL'));
$za_contents[] = array('text' => BOX_CATALOG_CATEGORIES_PRODUCTS, 'link' => zen_href_link(FILENAME_CATEGORIES, '', 'NONSSL'));
// Edit
$za_contents[] = array('text' => BOX_CATALOG_PRODUCTS_WITH_ATTRIBUTES_STOCK, 'link' => zen_href_link(FILENAME_PRODUCTS_WITH_ATTRIBUTES_STOCK, '', 'NONSSL'));
// end edit
$za_contents[] = array('text' => BOX_CATALOG_PRODUCT_TYPES, 'link' => zen_href_link(FILENAME_PRODUCT_TYPES, '', 'NONSSL'));
$za_contents[] = array('text' => BOX_CATALOG_PRODUCTS_PRICE_MANAGER, 'link' => zen_href_link(FILENAME_PRODUCTS_PRICE_MANAGER, '', 'NONSSL'));
$za_contents[] = array('text' => BOX_CATALOG_CATEGORIES_OPTIONS_NAME_MANAGER, 'link' => zen_href_link(FILENAME_OPTIONS_NAME_MANAGER, '', 'NONSSL'));
$za_contents[] = array('text' => BOX_CATALOG_CATEGORIES_OPTIONS_VALUES_MANAGER, 'link' => zen_href_link(FILENAME_OPTIONS_VALUES_MANAGER, '', 'NONSSL'));
$za_contents[] = array('text' => BOX_CATALOG_CATEGORIES_ATTRIBUTES_CONTROLLER, 'link' => zen_href_link(FILENAME_ATTRIBUTES_CONTROLLER, '', 'NONSSL'));
$za_contents[] = array('text' => BOX_CATALOG_CATEGORIES_ATTRIBUTES_DOWNLOADS_MANAGER, 'link' => zen_href_link(FILENAME_DOWNLOADS_MANAGER, '', 'NONSSL'));
$za_contents[] = array('text' => BOX_CATALOG_PRODUCT_OPTIONS_NAME, 'link' => zen_href_link(FILENAME_PRODUCTS_OPTIONS_NAME, '', 'NONSSL'));
$za_contents[] = array('text' => BOX_CATALOG_PRODUCT_OPTIONS_VALUES, 'link' => zen_href_link(FILENAME_PRODUCTS_OPTIONS_VALUES, '', 'NONSSL'));
$za_contents[] = array('text' => BOX_CATALOG_MANUFACTURERS, 'link' => zen_href_link(FILENAME_MANUFACTURERS, '', 'NONSSL'));
$za_contents[] = array('text' => BOX_CATALOG_REVIEWS, 'link' => zen_href_link(FILENAME_REVIEWS, '', 'NONSSL'));
$za_contents[] = array('text' => BOX_CATALOG_SPECIALS, 'link' => zen_href_link(FILENAME_SPECIALS, '', 'NONSSL'));
$za_contents[] = array('text' => BOX_CATALOG_FEATURED, 'link' => zen_href_link(FILENAME_FEATURED, '', 'NONSSL'));
$za_contents[] = array('text' => BOX_CATALOG_SALEMAKER, 'link' => zen_href_link(FILENAME_SALEMAKER, '', 'NONSSL'));
$za_contents[] = array('text' => BOX_CATALOG_PRODUCTS_EXPECTED, 'link' => zen_href_link(FILENAME_PRODUCTS_EXPECTED, '', 'NONSSL'));

if ($za_dir = @dir(DIR_WS_BOXES . 'extra_boxes')) {
while ($zv_file = $za_dir->read()) {
if (preg_match('/catalog_dhtml.php$/', $zv_file)) {
require(DIR_WS_BOXES . 'extra_boxes/' . $zv_file);
}
}
}

?>

<!-- catalog //--> <?php echo zen_draw_admin_box($za_heading, $za_contents); ?> <!-- catalog_eof //-->

Copy of database tables.php

// define the database table names used in the project
if (!defined('DB_PREFIX')) define('DB_PREFIX', '');
define('TABLE_ADDRESS_BOOK', DB_PREFIX . 'address_book');
define('TABLE_ADMIN', DB_PREFIX . 'admin');
define('TABLE_ADMIN_ACTIVITY_LOG', DB_PREFIX . 'admin_activity_log');
define('TABLE_ADDRESS_FORMAT', DB_PREFIX . 'address_format');
define('TABLE_AUTHORIZENET', DB_PREFIX . 'authorizenet');
define('TABLE_BANNERS', DB_PREFIX . 'banners');
define('TABLE_BANNERS_HISTORY', DB_PREFIX . 'banners_history');
define('TABLE_CATEGORIES', DB_PREFIX . 'categories');
define('TABLE_CATEGORIES_DESCRIPTION', DB_PREFIX . 'categories_description');
define('TABLE_CONFIGURATION', DB_PREFIX . 'configuration');
define('TABLE_CONFIGURATION_GROUP', DB_PREFIX . 'configuration_group');
define('TABLE_COUNTER', DB_PREFIX . 'counter');
define('TABLE_COUNTER_HISTORY', DB_PREFIX . 'counter_history');
define('TABLE_COUNTRIES', DB_PREFIX . 'countries');
define('TABLE_COUPON_GV_QUEUE', DB_PREFIX . 'coupon_gv_queue');
define('TABLE_COUPON_GV_CUSTOMER', DB_PREFIX . 'coupon_gv_customer');
define('TABLE_COUPON_EMAIL_TRACK', DB_PREFIX . 'coupon_email_track');
define('TABLE_COUPON_REDEEM_TRACK', DB_PREFIX . 'coupon_redeem_track');
define('TABLE_COUPON_RESTRICT', DB_PREFIX . 'coupon_restrict');
define('TABLE_COUPONS', DB_PREFIX . 'coupons');
define('TABLE_COUPONS_DESCRIPTION', DB_PREFIX . 'coupons_description');
define('TABLE_CURRENCIES', DB_PREFIX . 'currencies');
define('TABLE_CUSTOMERS', DB_PREFIX . 'customers');
define('TABLE_CUSTOMERS_BASKET', DB_PREFIX . 'customers_basket');
define('TABLE_CUSTOMERS_BASKET_ATTRIBUTES', DB_PREFIX . 'customers_basket_attributes');
define('TABLE_CUSTOMERS_INFO', DB_PREFIX . 'customers_info');
define('TABLE_DB_CACHE', DB_PREFIX . 'db_cache');
define('TABLE_EMAIL_ARCHIVE', DB_PREFIX . 'email_archive');
define('TABLE_FEATURED', DB_PREFIX . 'featured');
define('TABLE_FILES_UPLOADED', DB_PREFIX . 'files_uploaded');
define('TABLE_GROUP_PRICING', DB_PREFIX . 'group_pricing');
define('TABLE_GET_TERMS_TO_FILTER', DB_PREFIX . 'get_terms_to_filter');
define('TABLE_LANGUAGES', DB_PREFIX . 'languages');
define('TABLE_LAYOUT_BOXES', DB_PREFIX . 'layout_boxes');
define('TABLE_MANUFACTURERS', DB_PREFIX . 'manufacturers');
define('TABLE_MANUFACTURERS_INFO', DB_PREFIX . 'manufacturers_info');
define('TABLE_META_TAGS_PRODUCTS_DESCRIPTION', DB_PREFIX . 'meta_tags_products_description');
define('TABLE_NEWSLETTERS', DB_PREFIX . 'newsletters');
define('TABLE_ORDERS', DB_PREFIX . 'orders');
define('TABLE_ORDERS_PRODUCTS', DB_PREFIX . 'orders_products');
define('TABLE_ORDERS_PRODUCTS_ATTRIBUTES', DB_PREFIX . 'orders_products_attributes');
define('TABLE_ORDERS_PRODUCTS_DOWNLOAD', DB_PREFIX . 'orders_products_download');
define('TABLE_ORDERS_STATUS', DB_PREFIX . 'orders_status');
define('TABLE_ORDERS_STATUS_HISTORY', DB_PREFIX . 'orders_status_history');
define('TABLE_ORDERS_TYPE', DB_PREFIX . 'orders_type');
define('TABLE_ORDERS_TOTAL', DB_PREFIX . 'orders_total');
define('TABLE_PAYPAL', DB_PREFIX . 'paypal');
define('TABLE_PAYPAL_SESSION', DB_PREFIX . 'paypal_session');
define('TABLE_PAYPAL_PAYMENT_STATUS', DB_PREFIX . 'paypal_payment_status');
define('TABLE_PAYPAL_PAYMENT_STATUS_HISTORY', DB_PREFIX . 'paypal_payment_status_history');
define('TABLE_PRODUCTS', DB_PREFIX . 'products');
define('TABLE_PRODUCT_TYPES', DB_PREFIX . 'product_types');
define('TABLE_PRODUCT_TYPE_LAYOUT', DB_PREFIX . 'product_type_layout');
define('TABLE_PRODUCT_TYPES_TO_CATEGORY', DB_PREFIX . 'product_types_to_category');
define('TABLE_PRODUCTS_ATTRIBUTES', DB_PREFIX . 'products_attributes');
define('TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD', DB_PREFIX . 'products_attributes_download');
define('TABLE_PRODUCTS_DESCRIPTION', DB_PREFIX . 'products_description');
define('TABLE_PRODUCTS_DISCOUNT_QUANTITY', DB_PREFIX . 'products_discount_quantity');
define('TABLE_PRODUCTS_NOTIFICATIONS', DB_PREFIX . 'products_notifications');
define('TABLE_PRODUCTS_OPTIONS', DB_PREFIX . 'products_options');
define('TABLE_PRODUCTS_OPTIONS_VALUES', DB_PREFIX . 'products_options_values');
define('TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS', DB_PREFIX . 'products_options_values_to_products_options');
define('TABLE_PRODUCTS_OPTIONS_TYPES', DB_PREFIX . 'products_options_types');
define('TABLE_PRODUCTS_TO_CATEGORIES', DB_PREFIX . 'products_to_categories');
define('TABLE_PROJECT_VERSION', DB_PREFIX . 'project_version');
define('TABLE_PROJECT_VERSION_HISTORY', DB_PREFIX . 'project_version_history');
define('TABLE_QUERY_BUILDER', DB_PREFIX . 'query_builder');
define('TABLE_REVIEWS', DB_PREFIX . 'reviews');
define('TABLE_REVIEWS_DESCRIPTION', DB_PREFIX . 'reviews_description');
define('TABLE_SALEMAKER_SALES', DB_PREFIX . 'salemaker_sales');
define('TABLE_SESSIONS', DB_PREFIX . 'sessions');
define('TABLE_SPECIALS', DB_PREFIX . 'specials');
define('TABLE_TEMPLATE_SELECT', DB_PREFIX . 'template_select');
define('TABLE_TAX_CLASS', DB_PREFIX . 'tax_class');
define('TABLE_TAX_RATES', DB_PREFIX . 'tax_rates');
define('TABLE_GEO_ZONES', DB_PREFIX . 'geo_zones');
define('TABLE_ZONES_TO_GEO_ZONES', DB_PREFIX . 'zones_to_geo_zones');
define('TABLE_UPGRADE_EXCEPTIONS', DB_PREFIX . 'upgrade_exceptions');
define('TABLE_WISHLIST', DB_PREFIX . 'customers_wishlist');
define('TABLE_WHOS_ONLINE', DB_PREFIX . 'whos_online');
define('TABLE_ZONES', DB_PREFIX . 'zones');

define('TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK', DB_PREFIX . 'products_with_attributes_stock');

?>

25 Mar 2006, 3:10 AM
#239
shmegma avatar

shmegma

New Zenner

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

Re: Stock For Product With Different Attributes (OLD)

ginar,

I had the exact same problem you are having. I went back to the mysql panel from my server and I changed the create table from:
CREATE TABLE zen_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 )
)

to exactly what my error message said it couldn't find, in your case:
1146 Table 'XXXXX.TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK' doesn't exist.

So I changed my create table to:

CREATE TABLE 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 )
)

I used ALL CAPITAL letters just like my error message. I don't know if it is case sensitive or not but when I deleted the previous table I created and then re-created the new one it started working fine for me.

Hope this helps

25 Mar 2006, 5:27 AM
#240
hobbycache avatar

hobbycache

New Zenner

Join Date:
Jan 2006
Location:
Pleasant Grove, Utah
Posts:
53
Plugin Contributions:
0

Re: Stock For Product With Different Attributes (OLD)

I read through the whole thread and found two entries about this same question:

=====================
Just wanted to see if anyone has a suggestion for a case where I have certain products of unlimited quantity with about 200 attributes. It's a candle site and the candles are made to order so we don't need to list a quantity for each scent - it is unlimited. I don't really want to create a new entry for each one with quantity of 1,000,000 or something. Seems like there's got to be a way to have it ignore stock for certain items/attributes. Any thoughts?

I had a similar problem. There were some attributes I did not want to include in my stock count for certain products and there were products I just did not track stock for since they were always available.

I modifed the contrib so that it only includes the attributes that you want for the products that you want.

You can control this behavior through the attributes control panel. I basically added a switch in the panel to either include the attribute in the stock count or ignore it. (Trying to see if there is a way to control the count here too.)

I did have to modfiy some core functions to do this however, but it works like a champ. I am working on packaging it into soemthing readable as it is a lot of hacked code at this point.

As soon as it is ready I will post a link to download.

======================

And

======================
hmmm... if I added this mod to my doorknobs site how long would it take to enter all the possible product combinations?

Take one product for example: a simple doorknob set can have:
1 of 4 functions
1 of 2 backsets
1 of 2 door handings
1 of 15 outside finishes
1 of 15 inside finishes
1 of 36 outside knobs/levers
1 of 36 inside knobs/levers
1 of 12 rosettes on outside
1 of 12 rosettes on inside
too many choices to figure out on my fingers, but the trusty old calculator says that's a total of 671,846,400 possible combinations. Damn good thing they're made to order: I wouldn't want to have even one of each possible combination in stock...

That was a long read! 40+ pages. Neither of these posts really help me or tell me how to fix the problem I have with the product with multiple 5 attributes with 12-20 values in each. Is there a way to just tell that product not to use this contrib?

Any additions to these? Thanks.

Jason Petty