Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
the duplicate attributes drop down is from tpl_modules_attributes.php
I still got to troubleshoot it. looks like the settings on line 17 is in it twice (its also on line 46ish.) Could be the problem but I am not at home to test it.
Ajax is not enabled for the dynamic drop down. Just the admin page settings.
Thanks for the SQL fix. can't believe it was one darn word that was messing me up! LOL
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
lol! it's always the ones that are hiding in plain sight that cause the problem =]
I also fixed the tpl_modules_attributes.php page, and yes attributes options was listed twice:
Code:
<?php
/**
* Module Template
*
* Template used to render attribute display/input fields
*
* @package templateSystem
* @copyright Copyright 2003-2005 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: tpl_modules_attributes.php 3208 2006-03-19 16:48:57Z birdbrain $
*/
?>
<div id="productAttributes">
<?php if ($zv_display_select_option > 0) { ?>
<?php
$products_attributes = $db->Execute("select count(distinct products_options_id) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$_GET['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = ". (int)$_SESSION['languages_id'] ."");
if ($products_attributes->fields['total'] > 1) {
$products_id=(preg_match("/^\d{1,10}(\{\d{1,10}\}\d{1,10})*$/",$_GET['products_id']) ? $_GET['products_id'] : (int)$_GET['products_id']);
require(DIR_WS_CLASSES . 'pad_' . PRODINFO_ATTRIBUTE_PLUGIN_MULTI . '.php');
$class = 'pad_' . PRODINFO_ATTRIBUTE_PLUGIN_MULTI;
$pad = new $class($products_id);
echo $pad->draw();
}
elseif ($products_attributes->fields['total'] > 0) {
$products_id=(preg_match("/^\d{1,10}(\{\d{1,10}\}\d{1,10})*$/",$_GET['products_id']) ? $_GET['products_id'] : (int)$_GET['products_id']);
require(DIR_WS_CLASSES . 'pad_' . PRODINFO_ATTRIBUTE_PLUGIN_SINGLE . '.php');
$class = 'pad_' . PRODINFO_ATTRIBUTE_PLUGIN_SINGLE;
$pad = new $class($products_id);
echo $pad->draw();
}
?>
<?php
if ($options_attributes_image[$i] != '') {
?>
<?php echo $options_attributes_image[$i]; ?>
<?php
}
?>
<br class="clearBoth" />
<?php
}
?>
<?php
if ($show_onetime_charges_description == 'true') {
?>
<div class="wrapperAttribsOneTime"><?php echo TEXT_ONETIME_CHARGE_SYMBOL . TEXT_ONETIME_CHARGE_DESCRIPTION; ?></div>
<?php } ?>
<?php
if ($show_attributes_qty_prices_description == 'true') {
?>
<div class="wrapperAttribsQtyPrices"><?php echo zen_image(DIR_WS_TEMPLATE_ICONS . 'icon_status_green.gif', TEXT_ATTRIBUTES_QTY_PRICE_HELP_LINK, 10, 10) . ' ' . '<a href="javascript:popupWindowPrice(\'' . zen_href_link(FILENAME_POPUP_ATTRIBUTES_QTY_PRICES, 'products_id=' . $_GET['products_id'] . '&products_tax_class_id=' . $products_tax_class_id) . '\')">' . TEXT_ATTRIBUTES_QTY_PRICE_HELP_LINK . '</a>'; ?></div>
<?php } ?>
</div>
I think that's about it. Dynamic Drop Down ajax menu is working, Stock by Attributes is working, the product with their attributes are displaying on the order, stock is being deducted accordingly from the DB, I'm receiving order confirmation emails.
Thanks again creinold! :clap:
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Glad you got it working. I will update my alpha version tonight when i get home. =)
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Found one more thing to add to includes/languages/english/your_template_name_/product_info.php
Find:
Code:
define('TEXT_OUT_OF_STOCK_MESSAGE', 'The combination of options you have selected is currently out of stock. Please select another combination.');
Add after:
Code:
define('TEXT_SELECT_OPTIONS', 'Please select a preference for each option before proceeding');
This is for customers who tries to click add to cart button before selecting all options.
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Someone is on a roll. :wink:
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
Sheryll
To register the page here's the edit:
Code:
# Register the pages for Admin Access Control
INSERT IGNORE INTO admin_pages (page_key, language_key, main_page, page_params, menu_key, display_on_menu, sort_order) VALUES ('products with attributes stock', 'BOX_PRODUCTS_WITH_ATTRIBUTES_STOCK', 'FILENAME_PRODUCTS_WITH_ATTRIBUTES_STOCK', '', 'catalog', 'Y', 100);
remove 'CATALOG' from 'language_key': 'BOX_CATALOG_PRODUCTS_WITH_ATTRIBUTES_STOCK' should be 'BOX_PRODUCTS_WITH_ATTRIBUTES_STOCK'
-OR-
To do it manually on Admin Page Registration page, enter the following values:
Page Key: products with attributes stock
Page Name: BOX_PRODUCTS_WITH_ATTRIBUTES_STOCK
Page Filename: FILENAME_PRODUCTS_WITH_ATTRIBUTES_STOCK
Page Parameters: [leave blank]
Menu (select): Catalog
Display on Menu?: [check]
Sort Order: 999
Was this for me? If so... what does it mean... sorry!
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
callmeal
Was this for me? If so... what does it mean... sorry!
If you are running Zen-Cart 1.5.0 then it would be. ;)
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Quote:
Originally Posted by
creinold
If you are running Zen-Cart 1.5.0 then it would be. ;)
Phew - ok then it's fine that I didn't understand a word of it!
Can anybody help me with my problem on Version: 1.4.14 in post 1479? I just can't figure out why it won't show up on my web page even though the menus are in my zen cart :(
Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9
Thanks for all the help so far guys, I've got to the point now where customers can choose an item by it's attribute and it'll deduct from the database etc etc and I know that by going to the stock by attributes page (By typing the link manually) that this area's still working fine.
But for the life of me it still won't show in the catalog drop down. I've tried both of Sheryll's methods of getting it to show with no luck.
Ideas?? Also I installed your lastest Alpha version of plugin.