Page 84 of 359 FirstFirst ... 3474828384858694134184 ... LastLast
Results 831 to 840 of 3589
  1. #831
    Join Date
    Jul 2006
    Location
    Cardiff, Wales
    Posts
    305
    Plugin Contributions
    0

    Default Re: Stock by Attribute v4.0 for Zen Cart 1.3.5+

    @philip937

    sorry philip937 only just ready your question to me...

    I did not modify the code that much and did nothing with the insert scripts sorry. All I have done is show a category list at the start, and then filter the products by the category chosen. So I cant help with the issue on the insert or modified database you have sorry.

  2. #832
    Join Date
    Aug 2009
    Location
    Bedford, England
    Posts
    966
    Plugin Contributions
    0

    Default Re: Stock by Attribute v4.0 for Zen Cart 1.3.5+

    Quote Originally Posted by infocom View Post
    @philip937

    sorry philip937 only just ready your question to me...

    I did not modify the code that much and did nothing with the insert scripts sorry. All I have done is show a category list at the start, and then filter the products by the category chosen. So I cant help with the issue on the insert or modified database you have sorry.
    infocom,

    thanks for getting back to me. I really like what you've done and really want to get it working with my modified products_with_attributes_stock.php

    Is it easy to implement? As in would you be able to tell me what to add to my code to make it work, or if I were to post my code would you be able to add the necessary?

    Cheers,
    Phil
    ####################___
    www.fanciedress.co.uk

  3. #833
    Join Date
    Aug 2009
    Location
    Bedford, England
    Posts
    966
    Plugin Contributions
    0

    Default Re: Stock by Attribute v4.0 for Zen Cart 1.3.5+

    Quote Originally Posted by philip937 View Post
    infocom,

    thanks for getting back to me. I really like what you've done and really want to get it working with my modified products_with_attributes_stock.php

    Is it easy to implement? As in would you be able to tell me what to add to my code to make it work, or if I were to post my code would you be able to add the necessary?

    Cheers,
    Phil
    ####################___
    www.fanciedress.co.uk
    Just been doing a comparison with my file and yours. Which version of products_with_attributes_stock.php did you use?

    You seem to have this which I dont which is probably the bit i'm getting confused over:
    /*
    michael mcinally <[email protected]>
    heavily modified version to allow inserting "ALL" attributes at once
    also should probably run this SQL command as well:
    ALTER TABLE `products_with_attributes_stock` ADD UNIQUE `products_id_stock_attributes` (`products_id`, `stock_attributes`);
    */
    which i'm guessing has nothing to do with the filtering.. ?

  4. #834
    Join Date
    Oct 2009
    Location
    Co Clare Ireland
    Posts
    9
    Plugin Contributions
    0

    Default Re: Stock by Attribute v4.0 for Zen Cart 1.3.5+

    hi,

    installed this mod... and the admin side seemed to work OK - I tested I could go in and set stock quantities by attrib etc - they would appear in the store etc etc - but checkout was broken.

    So I read this thread and noticed a comment about putting backups of files into the same directory caused problems. so I moved my backups - the checkout is now working, but I can't now get into admin - I get the following:


    Warning: include(includes/extra_configures/._email_use_8bit.php) [function.include]: failed to open stream: No such file or directory in /home/i53830/public_html/tradeonline/admin/includes/application_top.php on line 111

    Warning: include(includes/extra_configures/._email_use_8bit.php) [function.include]: failed to open stream: No such file or directory in /home/i53830/public_html/tradeonline/admin/includes/application_top.php on line 111

    Warning: include() [function.include]: Failed opening 'includes/extra_configures/._email_use_8bit.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/i53830/public_html/tradeonline/admin/includes/application_top.php on line 111

    Warning: include(includes/extra_configures/._media_manager.php) [function.include]: failed to open stream: No such file or directory in /home/i53830/public_html/tradeonline/admin/includes/application_top.php on line 111

    Warning: include(includes/extra_configures/._media_manager.php) [function.include]: failed to open stream: No such file or directory in /home/i53830/public_html/tradeonline/admin/includes/application_top.php on line 111

    Warning: include() [function.include]: Failed opening 'includes/extra_configures/._media_manager.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/i53830/public_html/tradeonline/admin/includes/application_top.php on line 111

    Warning: include(includes/extra_configures/._security_patch_v138_20090619.php) [function.include]: failed to open stream: No such file or directory in /home/i53830/public_html/tradeonline/admin/includes/application_top.php on line 111

    Warning: include(includes/extra_configures/._security_patch_v138_20090619.php) [function.include]: failed to open stream: No such file or directory in /home/i53830/public_html/tradeonline/admin/includes/application_top.php on line 111

    Warning: include() [function.include]: Failed opening 'includes/extra_configures/._security_patch_v138_20090619.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/i53830/public_html/tradeonline/admin/includes/application_top.php on line 111

    Warning: require(includes/extra_datafiles/._music_type_database_names.php) [function.require]: failed to open stream: No such file or directory in /home/i53830/public_html/tradeonline/admin/includes/init_includes/init_file_db_names.php on line 40

    Warning: require(includes/extra_datafiles/._music_type_database_names.php) [function.require]: failed to open stream: No such file or directory in /home/i53830/public_html/tradeonline/admin/includes/init_includes/init_file_db_names.php on line 40

    Fatal error: require() [function.require]: Failed opening required 'includes/extra_datafiles/._music_type_database_names.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/i53830/public_html/tradeonline/admin/includes/init_includes/init_file_db_names.php on line 40
    any ideas whats gone wrong?!! very frustrated!!!

    thanks!!!
    clare....

  5. #835
    Join Date
    Mar 2008
    Location
    QLD - Aussie
    Posts
    192
    Plugin Contributions
    0

    Default Re: Stock by Attribute v4.0 for Zen Cart 1.3.5+

    Hi
    I have spent quite sometime reading thru this thread, so thank you everyone for sharing insights & hints

    I've downloaded the recommended stable version (4.7) , and now I'm just going thru & comparing files. I'm only very very very new to winmerge, and to be honest, 'merging' files still makes me very nervous.

    The file to be overridden: includes/templates/template_default/templates/tpl_shopping_cart_default.php is the one causing me concern.

    I've included my file, and the mod's file below. Just hoping that a wonderful Zen Cart merging guru could help me to work out how to merge these 2 files safely?

    Many thanks

    Mod's File:
    <?php
    /**
    * Page Template
    *
    * Loaded automatically by index.php?main_page=shopping_cart.<br />
    * Displays shopping-cart contents
    *
    * @package templateSystem
    * @copyright Copyright 2003-2007 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_shopping_cart_default.php 2007-12-02 00:00:00Z kuroi $
    */
    ?>
    <div class="centerColumn" id="shoppingCartDefault">
    <?php
    if ($flagHasCartContents) {
    ?>

    <?php
    if ($_SESSION['cart']->count_contents() > 0) {
    ?>
    <div class="forward"><?php echo TEXT_VISITORS_CART; ?></div>
    <?php
    }
    ?>

    <h1 id="cartDefaultHeading"><?php echo HEADING_TITLE; ?></h1>

    <?php if ($messageStack->size('shopping_cart') > 0) echo $messageStack->output('shopping_cart'); ?>

    <?php echo zen_draw_form('cart_quantity', zen_href_link(FILENAME_SHOPPING_CART, 'action=update_product')); ?>
    <div id="cartInstructionsDisplay" class="content"><?php echo TEXT_INFORMATION; ?></div>

    <?php if (!empty($totalsDisplay)) { ?>
    <div class="cartTotalsDisplay important"><?php echo $totalsDisplay; ?></div>
    <br class="clearBoth" />
    <?php } ?>

    <?php if ($flagAnyOutOfStock) { ?>

    <?php if (STOCK_ALLOW_CHECKOUT == 'true') { ?>

    <div class="messageStackError"><?php echo OUT_OF_STOCK_CAN_CHECKOUT; ?></div>

    <?php } else { ?>
    <div class="messageStackError"><?php echo OUT_OF_STOCK_CANT_CHECKOUT; ?></div>

    <?php } //endif STOCK_ALLOW_CHECKOUT ?>
    <?php } //endif flagAnyOutOfStock ?>

    <table border="0" width="100%" cellspacing="0" cellpadding="0" id="cartContentsDisplay">
    <tr class="tableHeading">
    <th scope="col" id="scQuantityHeading"><?php echo TABLE_HEADING_QUANTITY; ?></th>
    <th scope="col" id="scUpdateQuantity">&nbsp;</th>
    <th scope="col" id="scProductsHeading"><?php echo TABLE_HEADING_PRODUCTS; ?></th>
    <th scope="col" id="scUnitHeading"><?php echo TABLE_HEADING_PRICE; ?></th>
    <th scope="col" id="scTotalHeading"><?php echo TABLE_HEADING_TOTAL; ?></th>
    <th scope="col" id="scRemoveHeading">&nbsp;</th>
    </tr>
    <!-- Loop through all products /-->
    <?php
    foreach ($productArray as $product) {
    ?>
    <tr class="<?php echo $product['rowClass']; ?>">
    <td class="cartQuantity">
    <?php
    if ($product['flagShowFixedQuantity']) {
    echo $product['showFixedQuantityAmount'] . '<br /><span class="alert bold">' . $product['flagStockCheck'] . '</span><br /><br />' . $product['showMinUnits'];
    } else {
    echo $product['quantityField'] . '<br /><span class="alert bold">' . $product['flagStockCheck'] . '</span><br /><br />' . $product['showMinUnits'];
    }
    ?>
    </td>
    <td class="cartQuantityUpdate">
    <?php
    if ($product['buttonUpdate'] == '') {
    echo '' ;
    } else {
    echo $product['buttonUpdate'];
    }
    ?>
    </td>
    <td class="cartProductDisplay">
    <a href="<?php echo $product['linkProductsName']; ?>"><span id="cartImage" class="back"><?php echo $product['productsImage']; ?></span><span id="cartProdTitle"><?php echo $product['productsName'] . '<span class="alert bold">' . $product['flagStockCheck'] . '</span>'; ?></span></a>

    <?php if ((STOCK_SHOW_LOW_IN_CART == 'true') && $product['flagStockCheck']) {
    echo '<span class="alert bold">';
    echo PWA_STOCK_AVAILABLE;
    echo ((isset($product['stockAvailable'])) ? $product['stockAvailable']: 0);
    echo '</span>';
    }
    ?>
    <br class="clearBoth" />

    <?php
    echo $product['attributeHiddenField'];
    if (isset($product['attributes']) && is_array($product['attributes'])) {
    echo '<div class="cartAttribsList">';
    echo '<ul>';
    reset($product['attributes']);
    foreach ($product['attributes'] as $option => $value) {
    $product_options_name = $value['products_options_name'];
    $product_options_name_array = explode(":", $product_options_name);
    $product_options_name = $product_options_name_array[0];
    ?>

    <li><?php echo $value['products_options_name'] . TEXT_OPTION_DIVIDER . nl2br($value['products_options_values_name']); ?></li>

    <?php
    }
    echo '</ul>';
    echo '</div>';
    }
    ?>
    </td>
    <td class="cartUnitDisplay"><?php echo $product['productsPriceEach']; ?></td>
    <td class="cartTotalDisplay"><?php echo $product['productsPrice']; ?></td>
    <td class="cartRemoveItemDisplay">
    <?php
    if ($product['buttonDelete']) {
    ?>
    <a href="<?php echo zen_href_link(FILENAME_SHOPPING_CART, 'action=remove_product&product_id=' . $product['id']); ?>"><?php echo zen_image($template->get_template_dir(ICON_IMAGE_TRASH, DIR_WS_TEMPLATE, $current_page_base,'images/icons'). '/' . ICON_IMAGE_TRASH, ICON_TRASH_ALT); ?></a>
    <?php
    }
    if ($product['checkBoxDelete'] ) {
    echo zen_draw_checkbox_field('cart_delete[]', $product['id']);
    }
    ?>
    </td>
    </tr>
    <?php
    } // end foreach ($productArray as $product)
    ?>
    <!-- Finished loop through all products /-->
    </table>

    <div id="cartSubTotal"><?php echo SUB_TITLE_SUB_TOTAL; ?> <?php echo $cartShowTotal; ?></div>
    <br class="clearBoth" />

    <!--bof shopping cart buttons-->
    <div class="buttonRow forward"><?php echo '<a href="' . zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . zen_image_button(BUTTON_IMAGE_CHECKOUT, BUTTON_CHECKOUT_ALT) . '</a>'; ?></div>
    <div class="buttonRow back"><?php echo zen_back_link() . zen_image_button(BUTTON_IMAGE_CONTINUE_SHOPPING, BUTTON_CONTINUE_SHOPPING_ALT) . '</a>'; ?></div>
    <?php
    // show update cart button
    if (SHOW_SHOPPING_CART_UPDATE == 2 or SHOW_SHOPPING_CART_UPDATE == 3) {
    ?>
    <div class="buttonRow back"><?php echo zen_image_submit(ICON_IMAGE_UPDATE, ICON_UPDATE_ALT); ?></div>
    <?php
    } else { // don't show update button below cart
    ?>
    <?php
    } // show update button
    ?>
    <!--eof shopping cart buttons-->

    </form>

    <br class="clearBoth" />
    <?php
    if (SHOW_SHIPPING_ESTIMATOR_BUTTON == '1') {
    ?>

    <div class="buttonRow back"><?php echo '<a href="javascriptopupWindow(\'' . zen_href_link(FILENAME_POPUP_SHIPPING_ESTIMATOR) . '\')">' .
    zen_image_button(BUTTON_IMAGE_SHIPPING_ESTIMATOR, BUTTON_SHIPPING_ESTIMATOR_ALT) . '</a>'; ?></div>
    <?php
    }
    ?>

    <!-- ** BEGIN PAYPAL EXPRESS CHECKOUT ** -->
    <?php // the tpl_ec_button template only displays EC option if cart contents >0 and value >0
    if (defined('MODULE_PAYMENT_PAYPALWPP_STATUS') && MODULE_PAYMENT_PAYPALWPP_STATUS == 'True') {
    include(DIR_FS_CATALOG . DIR_WS_MODULES . 'payment/paypal/tpl_ec_button.php');
    }
    ?>
    <!-- ** END PAYPAL EXPRESS CHECKOUT ** -->

    <?php
    if (SHOW_SHIPPING_ESTIMATOR_BUTTON == '2') {
    /**
    * load the shipping estimator code if needed
    */
    ?>
    <?php require(DIR_WS_MODULES . zen_get_module_directory('shipping_estimator.php')); ?>

    <?php
    }
    ?>
    <?php
    } else {
    ?>

    <h2 id="cartEmptyText"><?php echo TEXT_CART_EMPTY; ?></h2>

    <?php
    $show_display_shopping_cart_empty = $db->Execute(SQL_SHOW_SHOPPING_CART_EMPTY);

    while (!$show_display_shopping_cart_empty->EOF) {
    ?>

    <?php
    if ($show_display_shopping_cart_empty->fields['configuration_key'] == 'SHOW_SHOPPING_CART_EMPTY_FEATURED_PRODUCTS') { ?>
    <?php
    /**
    * display the Featured Products Center Box
    */
    ?>
    <?php require($template->get_template_dir('tpl_modules_featured_products.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_featured_products.php'); ?>
    <?php } ?>

    <?php
    if ($show_display_shopping_cart_empty->fields['configuration_key'] == 'SHOW_SHOPPING_CART_EMPTY_SPECIALS_PRODUCTS') { ?>
    <?php
    /**
    * display the Special Products Center Box
    */
    ?>
    <?php require($template->get_template_dir('tpl_modules_specials_default.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_specials_default.php'); ?>
    <?php } ?>

    <?php
    if ($show_display_shopping_cart_empty->fields['configuration_key'] == 'SHOW_SHOPPING_CART_EMPTY_NEW_PRODUCTS') { ?>
    <?php
    /**
    * display the New Products Center Box
    */
    ?>
    <?php require($template->get_template_dir('tpl_modules_whats_new.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_whats_new.php'); ?>
    <?php } ?>

    <?php
    if ($show_display_shopping_cart_empty->fields['configuration_key'] == 'SHOW_SHOPPING_CART_EMPTY_UPCOMING') {
    include(DIR_WS_MODULES . zen_get_module_directory(FILENAME_UPCOMING_PRODUCTS));
    }
    ?>
    <?php
    $show_display_shopping_cart_empty->MoveNext();
    } // !EOF
    ?>

    <?php
    }
    ?>

    </div>


    My current file:



    <?php
    /**
    * Page Template
    *
    * Loaded automatically by index.php?main_page=shopping_cart.<br />
    * Displays shopping-cart contents
    *
    * @package templateSystem
    * @copyright Copyright 2003-2007 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_shopping_cart_default.php 6528 2007-06-25 23:25:27Z drbyte $
    */
    ?>
    <div class="centerColumn" id="shoppingCartDefault">
    <?php
    if ($flagHasCartContents) {
    ?>

    <?php
    if ($_SESSION['cart']->count_contents() > 0) {
    ?>
    <div class="text_v_c"><?php echo TEXT_VISITORS_CART; ?></div>
    <?php
    }
    ?>
    <div class="side_left_2">
    <div class="side_right_2">
    <div class="side_top_2">
    <div class="side_bot_2">
    <div class="left_top_2">
    <div class="right_top_2">
    <div class="left_bot_2">
    <div class="right_bot_2">
    <h1 id="cartDefaultHeading"><?php echo HEADING_TITLE; ?></h1>
    </div>
    </div>
    </div>
    </div>
    </div>
    </div>
    </div>
    </div>
    <?php if ($messageStack->size('shopping_cart') > 0) echo $messageStack->output('shopping_cart'); ?>

    <?php echo zen_draw_form('cart_quantity', zen_href_link(FILENAME_SHOPPING_CART, 'action=update_product')); ?>
    <div id="cartInstructionsDisplay" class="content"><?php echo TEXT_INFORMATION; ?></div>

    <?php if (!empty($totalsDisplay)) { ?>
    <div class="cartTotalsDisplay important"><?php echo $totalsDisplay; ?></div>
    <br class="clearBoth" />
    <?php } ?>

    <?php if ($flagAnyOutOfStock) { ?>

    <?php if (STOCK_ALLOW_CHECKOUT == 'true') { ?>

    <div class="messageStackError"><?php echo OUT_OF_STOCK_CAN_CHECKOUT; ?></div>

    <?php } else { ?>
    <div class="messageStackError"><?php echo OUT_OF_STOCK_CANT_CHECKOUT; ?></div>

    <?php } //endif STOCK_ALLOW_CHECKOUT ?>
    <?php } //endif flagAnyOutOfStock ?>

    <table border="0" width="100%" cellspacing="0" cellpadding="0" id="cartContentsDisplay">
    <tr class="tableHeading">
    <th scope="col" id="scQuantityHeading"><?php echo TABLE_HEADING_QUANTITY; ?></th>
    <th scope="col" id="scProductsHeading"><?php echo TABLE_HEADING_PRODUCTS; ?></th>
    <th scope="col" id="scTotalHeading"><?php echo TABLE_HEADING_TOTAL; ?></th>
    <th scope="col" id="scRemoveHeading"><?php echo TABLE_HEADING_REMOVE; ?></th>
    </tr>
    <!-- Loop through all products /-->
    <?php
    foreach ($productArray as $product) {
    ?>
    <tr class="<?php echo $product['rowClass']; ?>">
    <td class="cartQuantity">
    <?php
    if ($product['flagShowFixedQuantity']) {
    echo $product['showFixedQuantityAmount'] . '<br /><span class="alert bold">' . $product['flagStockCheck'] . '</span><br />' . $product['showMinUnits'];
    } else {
    echo $product['quantityField'] . '<br /><span class="alert bold">' . $product['flagStockCheck'] . '</span><br />' . $product['showMinUnits'];
    }
    ?>
    <div class="buttonRow">
    <?php
    if ($product['buttonUpdate'] == '') {
    echo '' ;
    } else {
    echo $product['buttonUpdate'];
    }
    ?>
    </div>
    <?php
    echo '<br /><br />';
    ?>
    </td>
    <td class="cartProductDisplay">
    <a href="<?php echo $product['linkProductsName']; ?>"><span id="cartImage" class="back"><?php echo $product['productsImage']; ?></span><span id="cartProdTitle"><?php echo $product['productsName'] . '<span class="alert bold">' . $product['flagStockCheck'] . '</span>'; ?></span></a>
    <br class="clearBoth" />



    <?php
    echo $product['attributeHiddenField'];
    if (isset($product['attributes']) && is_array($product['attributes'])) {
    echo '<div class="cartAttribsList">';
    echo '<ul>';
    reset($product['attributes']);
    foreach ($product['attributes'] as $option => $value) {
    ?>

    <li><?php echo $value['products_options_name'] . TEXT_OPTION_DIVIDER . nl2br($value['products_options_values_name']); ?></li>

    <?php
    }
    echo '</ul>';
    echo '</div>';
    }
    ?>
    </td>
    <td class="cartTotalDisplay"><?php echo $product['productsPrice']; ?></td>
    <td class="cartRemoveItemDisplay"><div class="buttonRow3">
    <?php
    if ($product['checkBoxDelete'] ) {
    echo zen_draw_checkbox_field('cart_delete[]', $product['id']);
    }
    ?>
    <?php
    echo '</div><br /><br />';
    ?>
    <div class="buttonRow"><?php
    if ($product['buttonDelete']) {
    ?>
    <a href="<?php echo zen_href_link(FILENAME_SHOPPING_CART, 'action=remove_product&product_id=' . $product['id']); ?>"><?php echo zen_image($template->get_template_dir(ICON_IMAGE_TRASH, DIR_WS_TEMPLATE, $current_page_base,'images/icons'). '/' . ICON_IMAGE_TRASH, ICON_TRASH_ALT); ?></a>
    <?php
    }
    ?></div>
    </td>
    </tr>
    <?php
    } // end foreach ($productArray as $product)
    ?>

    <!-- Finished loop through all products /-->
    </table>

    <div id="cartSubTotal"><?php echo SUB_TITLE_SUB_TOTAL; ?> <strong><?php echo $cartShowTotal; ?></strong></div>
    <br class="clearBoth" />

    <!--bof shopping cart buttons-->
    <div class="buttonRow forward"><?php echo '<a href="' . zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . zen_image_button(BUTTON_IMAGE_CHECKOUT, BUTTON_CHECKOUT_ALT) . '</a>'; ?></div>
    <div class="buttonRow back"><?php echo zen_back_link() . zen_image_button(BUTTON_IMAGE_CONTINUE_SHOPPING, BUTTON_CONTINUE_SHOPPING_ALT) . '</a>'; ?></div>
    <?php
    // show update cart button
    if (SHOW_SHOPPING_CART_UPDATE == 2 or SHOW_SHOPPING_CART_UPDATE == 3) {
    ?>
    <div class="buttonRow back"><?php echo zen_image_submit(ICON_IMAGE_UPDATE, ICON_UPDATE_ALT); ?></div>
    <?php
    } else { // don't show update button below cart
    ?>
    <?php
    } // show update button
    ?>
    <!--eof shopping cart buttons-->
    </form>

    <br class="clearBoth" />
    <?php
    if (SHOW_SHIPPING_ESTIMATOR_BUTTON == '1') {
    ?>

    <div class="buttonRow back"><?php echo '<a href="javascriptopupWindow(\'' . zen_href_link(FILENAME_POPUP_SHIPPING_ESTIMATOR) . '\')">' .
    zen_image_button(BUTTON_IMAGE_SHIPPING_ESTIMATOR, BUTTON_SHIPPING_ESTIMATOR_ALT) . '</a>'; ?></div>
    <?php
    }
    ?>

    <!-- ** BEGIN PAYPAL EXPRESS CHECKOUT ** -->
    <?php // the tpl_ec_button template only displays EC option if cart contents >0 and value >0
    if (defined('MODULE_PAYMENT_PAYPALWPP_STATUS') && MODULE_PAYMENT_PAYPALWPP_STATUS == 'True') {
    include(DIR_FS_CATALOG . DIR_WS_MODULES . 'payment/paypal/tpl_ec_button.php');
    }
    ?>
    <!-- ** END PAYPAL EXPRESS CHECKOUT ** -->

    <?php
    if (SHOW_SHIPPING_ESTIMATOR_BUTTON == '2') {
    /**
    * load the shipping estimator code if needed
    */
    ?>
    <?php require(DIR_WS_MODULES . zen_get_module_directory('shipping_estimator.php')); ?>

    <?php
    }
    ?>
    <?php
    } else {
    ?>

    <h2 id="cartEmptyText"><?php echo TEXT_CART_EMPTY; ?></h2>

    <?php
    $show_display_shopping_cart_empty = $db->Execute(SQL_SHOW_SHOPPING_CART_EMPTY);

    while (!$show_display_shopping_cart_empty->EOF) {
    ?>

    <?php
    if ($show_display_shopping_cart_empty->fields['configuration_key'] == 'SHOW_SHOPPING_CART_EMPTY_FEATURED_PRODUCTS') { ?>
    <?php
    /**
    * display the Featured Products Center Box
    */
    ?>
    <?php require($template->get_template_dir('tpl_modules_featured_products.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_featured_products.php'); ?>
    <?php } ?>

    <?php
    if ($show_display_shopping_cart_empty->fields['configuration_key'] == 'SHOW_SHOPPING_CART_EMPTY_SPECIALS_PRODUCTS') { ?>
    <?php
    /**
    * display the Special Products Center Box
    */
    ?>
    <?php require($template->get_template_dir('tpl_modules_specials_default.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_specials_default.php'); ?>
    <?php } ?>

    <?php
    if ($show_display_shopping_cart_empty->fields['configuration_key'] == 'SHOW_SHOPPING_CART_EMPTY_NEW_PRODUCTS') { ?>
    <?php
    /**
    * display the New Products Center Box
    */
    ?>
    <?php require($template->get_template_dir('tpl_modules_whats_new.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_whats_new.php'); ?>
    <?php } ?>

    <?php
    if ($show_display_shopping_cart_empty->fields['configuration_key'] == 'SHOW_SHOPPING_CART_EMPTY_UPCOMING') {
    include(DIR_WS_MODULES . zen_get_module_directory(FILENAME_UPCOMING_PRODUCTS));
    }
    ?>
    <?php
    $show_display_shopping_cart_empty->MoveNext();
    } // !EOF
    ?>
    <?php
    }
    ?>
    </div>

  6. #836
    Join Date
    Mar 2008
    Location
    QLD - Aussie
    Posts
    192
    Plugin Contributions
    0

    Default Re: Stock by Attribute v4.0 for Zen Cart 1.3.5+

    Hi all,
    I'm still hoping that someone can help me regarding my file merging question (previous post)
    I'm OK with the fields that can be just merged across, but there are a couple of areas that I really am unsure about.

    (I'm afraid that I really am a coward when it comes to this - sorry...) But - happy to learn

  7. #837
    Join Date
    Mar 2008
    Location
    QLD - Aussie
    Posts
    192
    Plugin Contributions
    0

    Default Re: Stock by Attribute v4.0 for Zen Cart 1.3.5+

    I've been looking at this all day...and have isolated my 'merging woes' down to the following snippets (I really hope this isn't an imposition ...)

    line 23 (orig file)

    PHP Code:
    <<div class="text_v_c"><?php echo TEXT_VISITORS_CART?></div>
    mod's file

    PHP Code:
    <div class="forward"><?php echo TEXT_VISITORS_CART?></div>
    line 59 (orig file)

    PHP Code:
            <th scope="col" id="scRemoveHeading"><?php echo TABLE_HEADING_REMOVE?></th>
    mod's file
    PHP Code:
            <th scope="col" id="scRemoveHeading">&nbsp;</th
    line 74 (orig file)
    PHP Code:
    <div class="buttonRow"
    mod's file

    PHP Code:
           </td>
           <
    td class="cartQuantityUpdate"
    line 126 (orig file)
    PHP Code:
    ?></div> 
    Mod's file
    PHP Code:
      if ($product['checkBoxDelete'] ) {
        echo 
    zen_draw_checkbox_field('cart_delete[]'$product['id']);
      }
    ?> 
    Line 138 orig file
    PHP Code:
    <div id="cartSubTotal"><?php echo SUB_TITLE_SUB_TOTAL?> <strong><?php echo $cartShowTotal?></strong></div>
    mod's file
    PHP Code:
    <div id="cartSubTotal"><?php echo SUB_TITLE_SUB_TOTAL?> <?php echo $cartShowTotal?></div>
    I hope that someone can enlighten me - thank you so much

  8. #838
    Join Date
    Mar 2010
    Posts
    5
    Plugin Contributions
    0

    Default Re: Stock by Attribute v4.0 for Zen Cart 1.3.5+

    ZC 1.3.8 and SbA 4.7 both fresh installs:

    OK, I'm trying to figure out how products_with_attributes_stock.stock_attributes relates to anything.

    My attributes (products_attributes.options_values_id) are 6,1,2,3,4,5 and my stock_attributes are 3,4,5,6,7,8. These each repeat for each of the 5 products for which I have attributes.

    My products_options_values.products_options_values_id are 0,1,2,3,4,5,6 (0 being TEXT)

    Only 1 type of product option, and products_options_values_to_products_options has 6 rows corresponding to products_options_values_to_products_options_id and products_options_values_id 1,2,3,4,5,6 all for products_options_id of 1.

    So, again, stock_attributes with 3,4,5,6,7,8 is the odd ID out. How do I relate stock_attributes to any of the other ids? Everything seems to work as expected, but I can't do any SQL with stock_attributes.

  9. #839
    Join Date
    Dec 2008
    Posts
    14
    Plugin Contributions
    0

    Default Re: Stock by Attribute v4.0 for Zen Cart 1.3.5+

    Does anyone have a link to this mod in action? I have a few questions regarding how it works from the customers end.

    Does it show out of stock on the product page level? Example, 1 item, with 4 attributes being seperate colors, 1 of the colors is out of stock. Does the mod prevent the out of stock color from being added to the shopping cart?

    Thank you!

  10. #840
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Stock by Attribute v4.0 for Zen Cart 1.3.5+

    @Green333

    You're using a template structured rather differently to a normal template. That huge mess of nested divs makes me suspect that it comes from Template Monster. It also means that the lines won't match up.

    If you zip up and post the actual template file (rather than pasting it here where it loses a lot of it's formatting) I'll take a look.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

 

 

Similar Threads

  1. Problems with addon: Dynamic Drop Downs for Stock By Attribute
    By Dunk in forum All Other Contributions/Addons
    Replies: 56
    Last Post: 30 Apr 2014, 07:55 PM
  2. MySQL Problem with Product with Attribute Stock addon
    By rtwingfield in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 20 Sep 2011, 03:35 PM
  3. Hide Zero Quantity Attributes with attribute-stock addon
    By leevil123 in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 11 Feb 2010, 05:06 PM
  4. Replies: 4
    Last Post: 22 Jan 2010, 10:43 PM
  5. Price Products in the grid by 'Stock by Attribute' addon?
    By Salixia in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 27 Oct 2009, 06:03 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR