Re: Stock by Attribute v4.0 for Zen Cart 1.3.5+
I'm hoping someone can help me. I have tried to install v4.7 of this addon and I'm getting an error message when I click on catalog->products with attributes stock It comes up with this message
Warning: main(includes/classes/products_with_attributes_stock.php) [function.main]: failed to open stream: No such file or directory in /home/eclectic/public_html/store/admin/products_with_attributes_stock.php on line 12
Warning: main(includes/classes/products_with_attributes_stock.php) [function.main]: failed to open stream: No such file or directory in /home/eclectic/public_html/store/admin/products_with_attributes_stock.php on line 12
Warning: main(includes/classes/products_with_attributes_stock.php) [function.main]: failed to open stream: No such file or directory in /home/eclectic/public_html/store/admin/products_with_attributes_stock.php on line 12
Fatal error: main() [function.require]: Failed opening required 'includes/classes/products_with_attributes_stock.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/eclectic/public_html/store/admin/products_with_attributes_stock.php on line 12
Can someone please help me fix this????
Thanks
Emma
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5+
Quote:
Originally Posted by
eclecticbaby
I'm hoping someone can help me. I have tried to install v4.7 of this addon and I'm getting an error message when I click on catalog->products with attributes stock It comes up with this message
Warning: main(includes/classes/products_with_attributes_stock.php) [function.main]: failed to open stream: No such file or directory in /home/eclectic/public_html/store/admin/products_with_attributes_stock.php on line 12
Warning: main(includes/classes/products_with_attributes_stock.php) [function.main]: failed to open stream: No such file or directory in /home/eclectic/public_html/store/admin/products_with_attributes_stock.php on line 12
Warning: main(includes/classes/products_with_attributes_stock.php) [function.main]: failed to open stream: No such file or directory in /home/eclectic/public_html/store/admin/products_with_attributes_stock.php on line 12
Fatal error: main() [function.require]: Failed opening required 'includes/classes/products_with_attributes_stock.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/eclectic/public_html/store/admin/products_with_attributes_stock.php on line 12
Can someone please help me fix this????
Thanks
Emma
I could be wrong, but the error message seems to indicate a file is missing/damaged from your install of this contrib. Did you check whether or not "products_with_attributes_stock.php" is located in your
"home/eclectic/public_html/store/admin" directory??
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5+
Hi,
Yes the "products_with_attributes_stock.php" is located in that directory.
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5+
I've figured it out, thanks for you help DivaVocals
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5+
Hello there,
I too was stuggling to get this modification working, so that customers can see what is in stock for each attribute. I am grateful for any reply or help. I made the changes to includes/modules/attributes.php
JUST FOUND IT!!!!!
Make sure to edit the attributes.php in your override folder. Then change option name to Radio and it works!!!
Hope this helps somebody out there!!!
Quote:
Here's an addition that will display the actual stock amounts for each attribute next to the attribute name. You can see it in action on this product in my store.
Open includes/modules/pages/product_info/main_template_vars_attributes.php and make the following changes:
Replace
Code:
$sql = "select pov.products_options_values_id,
pov.products_options_values_name,
pa.*
from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov
where pa.products_id = '" . (int)$_GET['products_id'] . "'
and pa.options_id = '" . (int)$products_options_names->fields['products_options_id'] . "'
and pa.options_values_id = pov.products_options_values_id
and pov.language_id = '" . (int)$_SESSION['languages_id'] . "' " .
$order_by;
by
Code:
$sql = "select pov.products_options_values_id,
pov.products_options_values_name,
pwas.quantity,
pa.*
from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov, " . TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK . " pwas
where pa.products_id = '" . (int)$_GET['products_id'] . "'
and pa.options_id = '" . (int)$products_options_names->fields['products_options_id'] . "'
and pa.options_values_id = pov.products_options_values_id
and pwas.stock_attributes = pa.products_attributes_id
and pov.language_id = '" . (int)$_SESSION['languages_id'] . "' " .
$order_by;
Next, in that same file replace:
Code:
if ($products_options_names->fields['products_options_type'] == PRODUCTS_OPTIONS_TYPE_FILE or $products_options_names->fields['products_options_type'] == PRODUCTS_OPTIONS_TYPE_TEXT or $products_options_names->fields['products_options_type'] == PRODUCTS_OPTIONS_TYPE_CHECKBOX or $products_options_names->fields['products_options_type'] == PRODUCTS_OPTIONS_TYPE_RADIO or $products_options->RecordCount() == 1 or $products_options_names->fields['products_options_type'] == PRODUCTS_OPTIONS_TYPE_READONLY) {
$products_options_value_id = $products_options->fields['products_options_values_id'];
if ($products_options_names->fields['products_options_type'] != PRODUCTS_OPTIONS_TYPE_TEXT and $products_options_names->fields['products_options_type'] != PRODUCTS_OPTIONS_TYPE_FILE) {
$products_options_details = $products_options->fields['products_options_values_name'];
} else {
// don't show option value name on TEXT or filename
$products_options_details = '';
}
if ($products_options_names->fields['products_options_images_style'] >= 3) {
$products_options_details .= $products_options_display_price . ($products_options->fields['products_attributes_weight'] != 0 ? '<br />' . $products_options_display_weight : '');
$products_options_details_noname = $products_options_display_price . ($products_options->fields['products_attributes_weight'] != 0 ? '<br />' . $products_options_display_weight : '');
} else {
$products_options_details .= $products_options_display_price . ($products_options->fields['products_attributes_weight'] != 0 ? '' . $products_options_display_weight : '');
$products_options_details_noname = $products_options_display_price . ($products_options->fields['products_attributes_weight'] != 0 ? '' . $products_options_display_weight : '');
}
}
by
Code:
if ($products_options_names->fields['products_options_type'] == PRODUCTS_OPTIONS_TYPE_FILE or $products_options_names->fields['products_options_type'] == PRODUCTS_OPTIONS_TYPE_TEXT or $products_options_names->fields['products_options_type'] == PRODUCTS_OPTIONS_TYPE_CHECKBOX or $products_options_names->fields['products_options_type'] == PRODUCTS_OPTIONS_TYPE_RADIO or $products_options->RecordCount() == 1 or $products_options_names->fields['products_options_type'] == PRODUCTS_OPTIONS_TYPE_READONLY) {
$products_options_value_id = $products_options->fields['products_options_values_id'];
if ($products_options_names->fields['products_options_type'] != PRODUCTS_OPTIONS_TYPE_TEXT and $products_options_names->fields['products_options_type'] != PRODUCTS_OPTIONS_TYPE_FILE) {
// $products_options_details = $products_options->fields['products_options_values_name'];
// gbm - replaced original line above to display attribute stock amount beside attribute
$products_options_details = $products_options->fields['products_options_values_name'] . ' [' . $products_options->fields['quantity'] . ' '. TEXT_ATTRIBUTES_PIECES . ']';
} else {
// don't show option value name on TEXT or filename
$products_options_details = '';
}
if ($products_options_names->fields['products_options_images_style'] >= 3) {
$products_options_details .= $products_options_display_price . ($products_options->fields['products_attributes_weight'] != 0 ? '<br />' . $products_options_display_weight : '');
// $products_options_details_noname = $products_options_display_price . ($products_options->fields['products_attributes_weight'] != 0 ? '<br />' . $products_options_display_weight : '');
// gbm - replaced original line above to display attribute stock amount beside attribute
$products_options_details_noname = ' [' . $products_options->fields['quantity'] . ' '. TEXT_ATTRIBUTES_PIECES . '] ' . $products_options_display_price . ($products_options->fields['products_attributes_weight'] != 0 ? '<br />' . $products_options_display_weight : '');
} else {
$products_options_details .= $products_options_display_price . ($products_options->fields['products_attributes_weight'] != 0 ? '' . $products_options_display_weight : '');
// $products_options_details_noname = $products_options_display_price . ($products_options->fields['products_attributes_weight'] != 0 ? '' . $products_options_display_weight : '');
// gbm - replaced original line above to display attribute stock amount beside attribute
$products_options_details_noname = ' [' . $products_options->fields['quantity'] . ' '. TEXT_ATTRIBUTES_PIECES . '] ' . $products_options_display_price . ($products_options->fields['products_attributes_weight'] != 0 ? '' . $products_options_display_weight : '');
}
}
Then open includes/languages/english/your_template/product_info.php and add the following line:
Code:
define('TEXT_ATTRIBUTES_PIECES','pieces');
Repeat for all languages in your store.
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5+
Hi guys,
Anyone using stock by attributes with the product cost price module?
Does it work together?
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5+
yes i listed this one in a differn't form - but i though i put it here (yes i know double adding) but this is the right place for it..
Ok just trying to add this mod to my site..
Stock by Attributes v4.7a
And they are telling me if i have a prfix such as "zen_" i have to fix the .sql up.. HOW do i do this as this is my config file...
Code:
/ define our database connection
define('DB_TYPE', 'mysql');
define('DB_PREFIX', 'zen_');
Code:
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 FLOAT 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 available stock level in cart when less than order', 'STOCK_SHOW_LOW_IN_CART', 'false',
'When customer places more items in cart than are available, show the available amount on the shopping cart page:',
'9',
'6',
NULL,
now(),
NULL,
"zen_cfg_select_option(array('true', 'false'),"
);
Do I just install the sql update.. or do i have to modify it??? as everyother mod i did i didn't have to add antying to the mod??
ME LOST and not a great data baser.... thanks...
:flex:
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5+
I don't much want to install any add-ons but will if I have to! I have version : 1.3.8a and I want to have different quantities for my attributes on my sunhats anyway of doing this without installing this add-on????
Thanks.
Newbie!:shocking:
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5+
Hello.
I have a problem that after installing Stock by Attributes of version 4.7 (also in 4.6) in Zencart version 1.3.7.1 I got an error message during order process. The message is:
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? I guess that the problem can be some conflict with some other contribution. I have the following add-ons installed: Printable Pricelist, Edit Orders, Easy Populate, Image Handler.
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5+
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...roducts_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.
tia.
A.