Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2011
    Posts
    8
    Plugin Contributions
    0

    Default Custom PHP in shopping cart

    I'm implementing the "Quantity Discount" module into my cart from a user on this forum, however I can't seem to get it to display the discounts inside the shopping cart so I figured I could make a quick work around since I only have a few products and they're the same price.

    When editing tpl_shopping_cart_default.php I decided to just create my own logical statements to display that they will be receiving the discount BEFORE checkout. However, anytime I throw in a new logic statement the cart doesn't display anything.

    PHP Code:
    <?php echo SUB_TITLE_SUB_TOTAL?><br>
    <?php $cntContents $_SESSION['cart']->count_contents(); ?>
    Total Items: <?php echo $cntContents?>

    <h2><?php echo $cartShowTotal?></h2><br />
    Works fine.

    PHP Code:
    <?php echo SUB_TITLE_SUB_TOTAL?><br>
    <?php $cntContents $_SESSION['cart']->count_contents(); ?>
    Total Items: <?php echo $cntContents?>

    <?php
    if($cntContents == 3) {
        echo 
    '<br>Discount One<br>';
    }
    ?>

    <h2><?php echo $cartShowTotal?></h2><br />
    Makes the whole cart go blank, like an error occurred... Also how can I get RAW total data?

  2. #2
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,683
    Plugin Contributions
    123

    Default Re: Custom PHP in shopping cart

    If you want Quantity Discounts, just download my contribution.

    http://www.zen-cart.com/index.php?ma...roducts_id=235

    Back out all your changes; they are unnecessary.
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

 

 

Similar Threads

  1. Custom Shopping Cart Images - Transparent Gifs
    By wolfderby in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 26 Nov 2009, 03:10 AM
  2. Adding custom fields to shopping cart
    By spjrr in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 10 Sep 2008, 03:29 PM
  3. Custom info in shopping cart
    By compevolve in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 10 Jan 2008, 01:51 PM
  4. Custom shopping cart page
    By mikedeezy33 in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 10 Oct 2007, 11:27 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