Page 12 of 24 FirstFirst ... 2101112131422 ... LastLast
Results 111 to 120 of 237
  1. #111
    Join Date
    Mar 2005
    Posts
    123
    Plugin Contributions
    0

    Default Re: Free Gifts-Dangling Carrot support

    Quote Originally Posted by lankeeyankee View Post
    I might have forgotten to include this in my previous instructions (and the zip I emailed to Strelitzia - sorry mate!!). I have attached the includes/modules/pages/shopping_cart/main_template_vars.php here. This will take care of the gift being left in the cart when the cart total is changed and drops below the threshold. Please let me know if this works now.

    The other gifts are left there in case the person changes their mind and wants to swap the gift for another one. You should see the message displaying something of this sort in the remaining gifts.

    If you enable the sidebox then people can see the gifts. Also, they can click on the gifts on the shopping cart page. I went a step further and created a new category called Free Gifts so that people can access it through the categories menu.
    Thanks mate - I will try the new file shortly...

    As for creating a free gifts category - yes this is how I have it setup but I have found that when a product is set as "carrot" it is removed from the category, so my "free gifts" category is showing as empty from the store side...! The items are still showing in the admin section and active but the category shows empty...

  2. #112
    Join Date
    Mar 2005
    Posts
    123
    Plugin Contributions
    0

    Default Re: Free Gifts-Dangling Carrot support

    Just a quick update - the new file didn't work... When a full priced item is removed from the cart the free gift still remains.

    Is there a way to stop the free gifts from showing on the cart page when a free gift is already selected? Maybe if the customer removes the free gift then they would show up again????? (just a suggestion!)

    Thanks

    Tony

  3. #113
    Join Date
    Jan 2007
    Posts
    1,483
    Plugin Contributions
    10

    Default Re: Free Gifts-Dangling Carrot support

    Quote Originally Posted by twdhosting View Post
    Thanks mate - I will try the new file shortly...

    As for creating a free gifts category - yes this is how I have it setup but I have found that when a product is set as "carrot" it is removed from the category, so my "free gifts" category is showing as empty from the store side...! The items are still showing in the admin section and active but the category shows empty...
    Hmmmm. I never checked that part out! It's the same for me actually, so I will have to add that to the bug list to be sorted out. Not sure why it won't show up under category views...... I guess for now you will need to disable the category and just use the sidebox.

    There is still the other remaining bug, though, that might prevent you from wanting to use this on a live site. And that is that when someone has a guest cart, reaches the threshold, adds gift, logs into their account which merges their guest cart and member cart, if they already had a gift in their member cart then both gifts will be in the cart instead of one being removed. That may or may not be a big deal to you to give 2 gifts where they should have only gotten one.

    Please let me know if you find any other bugs. I am working on getting them fixed but don't know how long it might be before the fixes are ready as I am super busy right now. This is usually our slow period but this year sales are at an all-time high! Which is a great reason for not having any spare time.

    Zen Cart and it's community are the best!!

  4. #114
    Join Date
    Jan 2007
    Posts
    1,483
    Plugin Contributions
    10

    Default Re: Free Gifts-Dangling Carrot support

    Quote Originally Posted by twdhosting View Post
    Just a quick update - the new file didn't work... When a full priced item is removed from the cart the free gift still remains.

    Is there a way to stop the free gifts from showing on the cart page when a free gift is already selected? Maybe if the customer removes the free gift then they would show up again????? (just a suggestion!)

    Thanks

    Tony
    Hmmmm.... I just checked this on a live test site and it will remove the gift when it goes below the threshold. I am not sure what might be going on. Can you download a copy of the main_template_vars.php file from your site and double check that this line is in there:

    PHP Code:
    if ($products[$i]['id'] == $gift->fields['products_id'] && $num_in_cart $gift->fields['threshold']){ $cart->remove($gift->fields['products_id']); zen_redirect(zen_href_link(FILENAME_SHOPPING_CART'''NONSSL')); } 
    Also, if you refresh the page after you have removed the item will the gift then be removed?

    Zen Cart and it's community are the best!!

  5. #115
    Join Date
    Mar 2005
    Posts
    123
    Plugin Contributions
    0

    Default Re: Free Gifts-Dangling Carrot support

    Yes that line of code is in there but it still isn't working... In fact there is another problem now - I cannot remove the free gift from the cart!!!

    Please feel free to try it http://www.stylesukdesignerclothing.co.uk

    As you can see the cart layout looks a little out, there isn't a quantity box for the free item (is this how it's supposed to be?) I think that there may have been some code changes to the tpl_shopping_cart_default.php file between zencart 1.3.7 and 1.3.8a?

  6. #116
    Join Date
    Jan 2007
    Posts
    1,483
    Plugin Contributions
    10

    Default Re: Free Gifts-Dangling Carrot support

    Quote Originally Posted by twdhosting View Post
    Yes that line of code is in there but it still isn't working... In fact there is another problem now - I cannot remove the free gift from the cart!!!

    Please feel free to try it http://www.stylesukdesignerclothing.co.uk

    As you can see the cart layout looks a little out, there isn't a quantity box for the free item (is this how it's supposed to be?) I think that there may have been some code changes to the tpl_shopping_cart_default.php file between zencart 1.3.7 and 1.3.8a?
    I couldn't remove either item from the cart, the gift or the regular item. I am not sure if this has anything to do with the SEO mod you are using. Are you using the Simple SEO URL mod? When clicking the remove button, this is the URL that is generated:

    http://www.stylesukdesignerclothing....5e8968ac04a830

    I thought that this long string of letters and numbers was to do with the zenid but if I try to remove the other product I get this URL:

    http://www.stylesukdesignerclothing....8415b5929d44ee

    which is different so it isn't to do with the zenid session string (at least I think so). And, more importantly, if you mouse over the remove button you will see the URL has ?action=remove_product on the end but you will notice that that is not in the URL in your browser address bar after clicking the remove button. Did you make sure that you can remove items without this mod installed? I just want to eliminate possibilities.

    Try disabling your SEO URL mod and try the gifts again to see if that was the problem.

    There isn't supposed to be a quantity box for the gift since they are supposed to only get one gift.
    Last edited by lankeeyankee; 7 Sep 2009 at 10:26 PM.

    Zen Cart and it's community are the best!!

  7. #117
    Join Date
    Mar 2005
    Posts
    123
    Plugin Contributions
    0

    Default Re: Free Gifts-Dangling Carrot support

    Thanks for taking a look, I have fixed the faulty delete buttons on the checkout as per the fix here http://www.zen-cart.com/forum/showthread.php?p=778460

    But the original item still remains in the cart when the free item is removed... And the message that only one free item can be added to the cart is still missing.

    Damn it's annoying because this is such a great mod - it's 95% working....!

  8. #118
    Join Date
    Jan 2007
    Posts
    1,483
    Plugin Contributions
    10

    Default Re: Free Gifts-Dangling Carrot support

    Quote Originally Posted by twdhosting View Post
    Thanks for taking a look, I have fixed the faulty delete buttons on the checkout as per the fix here http://www.zen-cart.com/forum/showthread.php?p=778460

    But the original item still remains in the cart when the free item is removed... And the message that only one free item can be added to the cart is still missing.

    Damn it's annoying because this is such a great mod - it's 95% working....!
    I noticed that when you try to add the gift to the cart it takes you to the listing instead and you have to add to cart from there. Again, this might an issue with SSU and not this mod. The end of the query string is again incorrect on the add to cart button for the gift on the shopping cart page. It should have &action=buy_now&product_id="whatever" but yours only has &action=buy_now. I think this is why you are being directed to the product page to add it to the cart instead of it just being added to the cart when you first click it. Isn't there a setting in SSU for the amount of parameters to allow in the query string? I would check that and also post about this on the SSU forum, Yellow1912 is super helpful.

    Also, I noticed that I can add a gift to the cart just as a regular product, but this mod disables the add to cart button on the product info display page and replaces it with a Return To Cart button. So, perhaps you haven't made all of the modifications, particularly to tpl_product_info_display.php or perhaps this is another clash with SSU?

    Can you disable SSU and then try it all again? I am sure that this works as expected and need to eliminate once and for all that SSU is the problem before spending more time trying to diagnose this.

    Zen Cart and it's community are the best!!

  9. #119
    Join Date
    May 2007
    Location
    Los Angeles
    Posts
    89
    Plugin Contributions
    0

    Default Re: Free Gifts-Dangling Carrot support

    Quote Originally Posted by lankeeyankee View Post
    Please post your original version without any of the carrot modifications, this way I am starting from a known working file.
    Here you go. Template before the mod.

    Code:
    <?php
    /**
     * Page Template
     *
     * Loaded automatically by index.php?main_page=shopping_cart.<br />
     * Displays shopping-cart contents
     *
     * @package templateSystem
     * @copyright Copyright 2003-2006 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 5414 2006-12-27 07:51:03Z drbyte $
     */
    ?>
    <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','SSL')); ?>
    <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" style="width:55px;"><?php echo TABLE_HEADING_QUANTITY; ?></th>
            <!--<th scope="col" id="scUpdateQuantity">&nbsp;</th>-->
            <th scope="col" id="scProductImage" style="width:55px;">&nbsp;</th>
            <th scope="col" id="scProductsHeading"><?php echo TABLE_HEADING_PRODUCTS; ?></th>
            <th scope="col" id="scUnitHeading" style="width:80px;">&nbsp;<?php echo TABLE_HEADING_PRICE; ?>&nbsp;</th>
            <th scope="col" id="scTotalHeading" style="width:80px;">&nbsp;<?php echo TABLE_HEADING_TOTAL; ?>&nbsp;</th>
            <th scope="col" id="scRemoveHeading" style="width:70px;">&nbsp;<?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
      echo zen_draw_hidden_field('products_id[]', $product['id']);    
      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'];
      }
    ?>
           </td>
    <!--     <td class="cartQuantityUpdate">
    <?php/*
      if ($product['buttonUpdate'] == '') {
        echo '' ;
      } else {
        echo $product['buttonUpdate'];
      }*/
    ?>
           </td>-->
            <td class="cartProductImage">
                <a href="<?php echo $product['linkProductsName']; ?>">
                    <?php echo $product['productsImage']; ?>
                </a>
            </td>
           <td class="cartProductDisplay">
    <a href="<?php echo $product['linkProductsName']; ?>"><span class="cartProdTitle"><?php echo $product['productsName'] . '<br /><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="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_GREEN, 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>
    <br class="clearBoth" />
    <?php
    // show update cart button
      if (SHOW_SHOPPING_CART_UPDATE == 2 or SHOW_SHOPPING_CART_UPDATE == 3) {
    ?>
    
    <div class="buttonRow back" style="padding-top: 5px;"><?php echo zen_image_submit(BUTTON_IMAGE_UPDATE, BUTTON_UPDATE_ALT); ?></div>
    <br class="clearBoth" />
    <?php
      } else { // don't show update button below cart
    ?>
    <?php
      } // show checkout button
    ?>
    
    <!--eof shopping cart buttons-->
    </form>
    
    
    <?php
        switch (true) {
          case (SHOW_SHIPPING_ESTIMATOR_BUTTON == '1'):
    ?>
    
    <div class="buttonRow back" style="padding-top: 5px;"><?php echo '<a href="javascript:popupWindow(\'' . zen_href_link(FILENAME_POPUP_SHIPPING_ESTIMATOR) . '\')">' .
     zen_image_button(BUTTON_IMAGE_SHIPPING_ESTIMATOR, BUTTON_SHIPPING_ESTIMATOR_ALT) . '</a>'; ?></div>
    
    <?php
          break;
          case (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
            break;
          }
    ?>
    <?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  include(DIR_WS_MODULES . 'show_google_components.php');  ?>
    <?php
        }
    ?>
    <!-- * BEGIN GOOGLE CHECKOUT * -->
     <?php
      // ** GOOGLE CHECKOUT **
        include(DIR_WS_MODULES . 'show_google_components.php');  
      // ** END GOOGLE CHECKOUT **
     ?>
    <!-- * END GOOGLE CHECKOUT * -->
    <!-- ** BEGIN PAYPAL EXPRESS CHECKOUT ** -->
    
      <?php  // only display EC option if cart contents >0 and value >0
    if (defined('MODULE_PAYMENT_PAYPALWPP_STATUS') && MODULE_PAYMENT_PAYPALWPP_STATUS == 'True' && $_SESSION['cart']->count_contents() > 0 && $_SESSION['cart']->total > 0) {
    ?>
        <hr style="border: 0.1px dashed rgb(182, 181, 192);">
        <?php echo TEXT_PAYPAL_EXPRESS_OFFER.TEXT_PAYPAL_EXPRESS_NOTE;?>
        <br />
    <?php
      include(DIR_FS_CATALOG . DIR_WS_MODULES . 'payment/paypal/tpl_ec_button.php');
    }
    ?>
    <!-- ** END PAYPAL EXPRESS CHECKOUT ** -->
    <br class="clearBoth" />
    </div>
    Thank you!

  10. #120
    Join Date
    Jan 2007
    Posts
    1,483
    Plugin Contributions
    10

    Default Re: Free Gifts-Dangling Carrot support

    Try this:

    PHP Code:
    <?php
    /**
     * Page Template
     *
     * Loaded automatically by index.php?main_page=shopping_cart.<br />
     * Displays shopping-cart contents
     *
     * @package templateSystem
     * @copyright Copyright 2003-2006 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 5414 2006-12-27 07:51:03Z drbyte $
     */
    ?>
    <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','SSL')); ?>
    <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" style="width:55px;"><?php echo TABLE_HEADING_QUANTITY?></th>
            <!--<th scope="col" id="scUpdateQuantity">&nbsp;</th>-->
            <th scope="col" id="scProductImage" style="width:55px;">&nbsp;</th>
            <th scope="col" id="scProductsHeading"><?php echo TABLE_HEADING_PRODUCTS?></th>
            <th scope="col" id="scUnitHeading" style="width:80px;">&nbsp;<?php echo TABLE_HEADING_PRICE?>&nbsp;</th>
            <th scope="col" id="scTotalHeading" style="width:80px;">&nbsp;<?php echo TABLE_HEADING_TOTAL?>&nbsp;</th>
            <th scope="col" id="scRemoveHeading" style="width:70px;">&nbsp;<?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
      
    echo zen_draw_hidden_field('products_id[]'$product['id']);    
      
    //begin carrot 
      /*
      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'];
      }
      */
      
    if ($product['carrot'] == 1) {
    //
     
    }elseif ($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'];
      }
      
    //eof carrot
    ?>
           </td>
    <!--     <td class="cartQuantityUpdate">
    <?php/*
      if ($product['buttonUpdate'] == '') {
        echo '' ;
      } else {
        echo $product['buttonUpdate'];
      }*/
    ?>
           </td>-->
           <?php //begin carrot ?>
                  <td class="cartQuantityUpdate">
    <?php
    if ($product['carrot'] == 1) {
    echo 
    TEXT_GIFT_IN_CART;
     }elseif (
    $product['buttonUpdate'] == '') {
       echo 
    '' ;
      } else {
        echo 
    $product['buttonUpdate'];
      }
    ?>

           </td>
           <?php //eof carrot ?>
            <td class="cartProductImage">
                <a href="<?php echo $product['linkProductsName']; ?>">
                    <?php echo $product['productsImage']; ?>
                </a>
            </td>
           <td class="cartProductDisplay">
    <a href="<?php echo $product['linkProductsName']; ?>"><span class="cartProdTitle"><?php echo $product['productsName'] . '<br /><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="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_TRASHDIR_WS_TEMPLATE$current_page_base,'images/icons'). '/' ICON_IMAGE_TRASHICON_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_GREENBUTTON_CHECKOUT_ALT) . '</a>'?></div>

    <div class="buttonRow back"><?php echo zen_back_link() . zen_image_button(BUTTON_IMAGE_CONTINUE_SHOPPINGBUTTON_CONTINUE_SHOPPING_ALT) . '</a>'?></div>
    <br class="clearBoth" />
    <?php
    // show update cart button
      
    if (SHOW_SHOPPING_CART_UPDATE == or SHOW_SHOPPING_CART_UPDATE == 3) {
    ?>

    <div class="buttonRow back" style="padding-top: 5px;"><?php echo zen_image_submit(BUTTON_IMAGE_UPDATEBUTTON_UPDATE_ALT); ?></div>
    <br class="clearBoth" />
    <?php
      
    } else { // don't show update button below cart
    ?>
    <?php
      
    // show checkout button
    ?>

    <!--eof shopping cart buttons-->
    </form>


    <?php
        
    switch (true) {
          case (
    SHOW_SHIPPING_ESTIMATOR_BUTTON == '1'):
    ?>

    <div class="buttonRow back" style="padding-top: 5px;"><?php echo '<a href="javascript:popupWindow(\'' zen_href_link(FILENAME_POPUP_SHIPPING_ESTIMATOR) . '\')">' .
     
    zen_image_button(BUTTON_IMAGE_SHIPPING_ESTIMATORBUTTON_SHIPPING_ESTIMATOR_ALT) . '</a>'?></div>

    <?php
          
    break;
          case (
    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
            
    break;
          }
          
    ?>
           <!--BOF dangling carrot v1.0-->
     
                <?php 
            
    if ($gift_message) {
                echo 
    '<div align="center"><span class="smallText">'.$gift_message.'</span></div><p>';
            }
            for (
    $i=0$n=sizeof($freebie); $i<$n$i++) {
                if (
    $gift_exists 0) {
                    
    $link TEXT_REMOVE_GIFT;
                } else {
                    
    $link $freebie[$i]['link'];
                }
                echo 
    '<table width="100%" align="center" cellspacing="1" bgcolor="#FFFFFF">
                <tr> <br>
                  <td class="smallText" bgcolor="#FFFFFF">  
                         <a href="' 
    zen_href_link(FILENAME_PRODUCT_INFO'products_id='.$freebie[$i]['id'], 'NONSSL') . '">' zen_image(DIR_WS_IMAGES $freebie[$i]['image'], $freebie[$i]['name'], GIFTS_IMAGE_WIDTHGIFTS_IMAGE_WIDTH'align="left"' )  . '</a>' 
                         
    $freebie[$i]['message'].'
                   <br><b>'
    .$freebie[$i]['name'].'</b>
                   <br> ' 
    TEXT_MAX_1_GIFT '
                         <br>'
    .$link.'
                  </td>
                </tr>
                </table>'
    ;                        
            }
            if (
    $freebie[0]['name']) {
                
            
    ?>
                    
       <?php
       
    }
       
    ?>
       <!--EOF dangling carrot v2.0--> 

    <?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  include(DIR_WS_MODULES 'show_google_components.php');  ?>
    <?php
        
    }
    ?>
    <!-- * BEGIN GOOGLE CHECKOUT * -->
     <?php
      
    // ** GOOGLE CHECKOUT **
        
    include(DIR_WS_MODULES 'show_google_components.php');  
      
    // ** END GOOGLE CHECKOUT **
     
    ?>
    <!-- * END GOOGLE CHECKOUT * -->
    <!-- ** BEGIN PAYPAL EXPRESS CHECKOUT ** -->

      <?php  // only display EC option if cart contents >0 and value >0
    if (defined('MODULE_PAYMENT_PAYPALWPP_STATUS') && MODULE_PAYMENT_PAYPALWPP_STATUS == 'True' && $_SESSION['cart']->count_contents() > && $_SESSION['cart']->total 0) {
    ?>
        <hr style="border: 0.1px dashed rgb(182, 181, 192);">
        <?php echo TEXT_PAYPAL_EXPRESS_OFFER.TEXT_PAYPAL_EXPRESS_NOTE;?>
        <br />
    <?php
      
    include(DIR_FS_CATALOG DIR_WS_MODULES 'payment/paypal/tpl_ec_button.php');
    }
    ?>
    <!-- ** END PAYPAL EXPRESS CHECKOUT ** -->
    <br class="clearBoth" />
    </div>
    Let me know if it works. Otherwise it's one of the other files, we'll figure it out.

    Zen Cart and it's community are the best!!

 

 
Page 12 of 24 FirstFirst ... 2101112131422 ... LastLast

Similar Threads

  1. Free Gifts - Dangling Carrot installation question
    By simpledomaining in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 26 Oct 2011, 03:27 PM
  2. Dangling carrot
    By strelitzia in forum All Other Contributions/Addons
    Replies: 13
    Last Post: 8 Dec 2009, 10:43 PM
  3. Dangling Carrot - lost my admin
    By tonyb in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 5 Nov 2008, 11:19 PM
  4. Dangling Carrot Mod
    By strelitzia in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 5 Oct 2008, 11:13 PM

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