Results 1 to 9 of 9
  1. #1
    Join Date
    Apr 2006
    Posts
    25
    Plugin Contributions
    0

    Default shopping cart contents text

    hello,
    ive just upgraded my zen cart to the newest version & changed host. While testing the checkout i noticed that on 'Step 3 of 3 - Order Confirmation' page theres 'Array' written after each one of my shopping cart items. I took a screen cap:

    http://www.e-rose.org/array.gif

    Does anyone know why it appeared & how i can remove it?

    Thanks so much

  2. #2
    Join Date
    Feb 2006
    Location
    Chicago
    Posts
    1,162
    Plugin Contributions
    0

    Default Re: shopping cart contents text

    Something wrong with

    includes\templates\template_default\templates\tpl_checkout_confirmation_default. php

    Please post the file here enclosed in --[ CODE] and [/CODE]
    Tutorials on Zen Cart
    http://tutorials.zen-cart.com/index.php
    ---------------
    advanced.programmer at gmail dot com
    In love with Zen Cart!!

  3. #3
    Join Date
    Apr 2006
    Posts
    25
    Plugin Contributions
    0

    Default Re: shopping cart contents text

    ok, thank you


    [ CODE]

    <?php
    /**
    * Page Template
    *
    * Loaded automatically by index.php?main_page=checkout_confirmation.<br />
    * Displays final checkout details, cart, payment and shipping info details.
    *
    * @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_checkout_confirmation_default.php 3306 2006-03-29 07:15:46Z drbyte $
    */
    ?>
    <div class="centerColumn" id="checkoutConfirmDefault">

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

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

    <div id="checkoutShipto" class="back">
    <h2 id="checkoutConfirmDefaultBillingAddress"><?php echo HEADING_BILLING_ADDRESS; ?></h2>
    <div class="buttonRow forward"><?php echo '<a href="' . zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL') . '">' . zen_image_button(BUTTON_IMAGE_EDIT_SMALL, BUTTON_EDIT_SMALL_ALT) . '</a>'; ?></div>

    <address><?php echo zen_address_format($order->billing['format_id'], $order->billing, 1, ' ', '<br />'); ?></address>

    <?php
    $class =& $_SESSION['payment'];
    ?>

    <h3 id="checkoutConfirmDefaultPayment"><?php echo HEADING_PAYMENT_METHOD; ?></h3>
    <h4 id="checkoutConfirmDefaultPaymentTitle"><?php echo $GLOBALS[$class]->title; ?></h4>

    <?php
    if (is_array($payment_modules->modules)) {
    if ($confirmation = $payment_modules->confirmation()) {
    ?>
    <div class="important"><?php echo $confirmation['title']; ?></div>
    <?php
    }
    ?>
    <div class="important">
    <?php
    for ($i=0, $n=sizeof($confirmation['fields']); $i<$n; $i++) {
    ?>
    <div class="back"><?php echo $confirmation['fields'][$i]['title']; ?></div>
    <div ><?php echo $confirmation['fields'][$i]['field']; ?></div>
    <?php
    }
    ?>
    </div>
    <?php
    }
    ?>

    <br class="clearBoth" />
    </div>

    <?php
    if ($_SESSION['sendto'] != false) {
    ?>
    <div id="checkoutBillto" class="forward">
    <h2 id="checkoutConfirmDefaultBillingAddress"><?php echo HEADING_DELIVERY_ADDRESS; ?></h2>
    <div class="buttonRow forward"><?php echo '<a href="' . zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . zen_image_button(BUTTON_IMAGE_EDIT_SMALL, BUTTON_EDIT_SMALL_ALT) . '</a>'; ?></div>

    <address><?php echo zen_address_format($order->delivery['format_id'], $order->delivery, 1, ' ', '<br />'); ?></address>

    <?php
    if ($order->info['shipping_method']) {
    ?>
    <h3 id="checkoutConfirmDefaultShipment"><?php echo HEADING_SHIPPING_METHOD; ?></h3>
    <h4 id="checkoutConfirmDefaultShipmentTitle"><?php echo $order->info['shipping_method']; ?></h4>

    <?php
    }
    ?>
    </div>
    <?php
    }
    ?>
    <br class="clearBoth" />
    <hr />
    <?php
    // always show comments
    // if ($order->info['comments']) {
    ?>

    <h2 id="checkoutConfirmDefaultHeadingComments"><?php echo HEADING_ORDER_COMMENTS; ?></h2>

    <div class="buttonRow forward"><?php echo '<a href="' . zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL') . '">' . zen_image_button(BUTTON_IMAGE_EDIT_SMALL, BUTTON_EDIT_SMALL_ALT) . '</a>'; ?></div>

    <div><?php echo (empty($order->info['comments']) ? NO_COMMENTS_TEXT : nl2br(zen_output_string_protected($order->info['comments'])) . zen_draw_hidden_field('comments', $order->info['comments'])); ?></div>
    <br class="clearBoth" />
    <?php
    // }
    ?>
    <hr />

    <h2 id="checkoutConfirmDefaultHeadingCart"><?php echo HEADING_PRODUCTS; ?></h2>

    <div class="buttonRow forward"><?php echo '<a href="' . zen_href_link(FILENAME_SHOPPING_CART) . '">' . zen_image_button(BUTTON_IMAGE_EDIT_SMALL, BUTTON_EDIT_SMALL_ALT) . '</a>'; ?></div>
    <br class="clearBoth" />
    <table border="0" width="100%" cellspacing="0" cellpadding="0" id="cartContentsDisplay">
    <tr class="cartTableHeading">
    <th scope="col" id="ccQuantityHeading" width="30"><?php echo TABLE_HEADING_QUANTITY; ?></th>
    <th scope="col" id="ccProductsHeading"><?php echo TABLE_HEADING_PRODUCTS; ?></th>
    <?php
    // If there are tax groups, display the tax columns for price breakdown
    if (sizeof($order->info['tax_groups']) > 1) {
    ?>
    <th scope="col" id="ccTaxHeading"><?php echo HEADING_TAX; ?></th>
    <?php
    }
    ?>
    <th scope="col" id="ccTotalHeading"><?php echo TABLE_HEADING_TOTAL; ?></th>
    </tr>
    <?php // now loop thru all products to display quantity and price ?>
    <?php for ($i=0, $n=sizeof($order->products); $i<$n; $i++) { ?>
    <tr class="<?php echo $product['rowClass']; ?>">
    <td class="cartQuantity"><?php echo $order->products[$i]['qty']; ?>&nbsp;x</td>
    <td class="cartProductDisplay"><?php echo $order->products[$i]['name']; ?>
    <?php echo $stock_check; ?>

    <?php // if there are attributes, loop thru them and display one per line
    if (isset($order->products[$i]['attributes']) && sizeof($order->products[$i]['attributes']) > 0 ) {
    echo '<ul id="cartAttribsList">';
    for ($j=0, $n2=sizeof($order->products[$i]['attributes']); $j<$n2; $j++) {
    ?>
    <li><?php echo $order->products[$i]['attributes'][$j]['option'] . ': ' . nl2br($order->products[$i]['attributes'][$j]['value']); ?></li>
    <?php
    } // end loop
    echo '</ul>';
    } // endif attribute-info
    ?>
    </td>

    <?php // display tax info if exists ?>
    <?php if (sizeof($order->info['tax_groups']) > 1) { ?>
    <td class="cartTotalDisplay">
    <?php echo zen_display_tax_value($order->products[$i]['tax']); ?>%</td>
    <?php } // endif tax info display ?>
    <td class="cartTotalDisplay">
    <?php echo $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']);
    if ($order->products[$i]['onetime_charges'] != 0 ) echo '<br /> ' . $currencies->display_price($order->products[$i]['onetime_charges'], $order->products[$i]['tax'], 1);
    ?>
    </td>
    </tr>
    <?php } // end for loopthru all products ?>
    </table>
    <hr />

    <?php
    if (MODULE_ORDER_TOTAL_INSTALLED) {
    $order_totals = $order_total_modules->process();
    ?>
    <div id="orderTotals"><?php $order_total_modules->output(); ?></div>
    <?php
    }
    ?>

    <?php
    echo zen_draw_form('checkout_confirmation', $form_action_url, 'post', 'id="checkout_confirmation" onsubmit="submitonce();"');

    if (is_array($payment_modules->modules)) {
    echo $payment_modules->process_button();
    }
    ?>
    <div class="buttonRow forward"><?php echo zen_image_submit(BUTTON_IMAGE_CONFIRM_ORDER, BUTTON_CONFIRM_ORDER_ALT, 'name="btn_submit" id="btn_submit"') ;?></div>
    </form>
    <div class="buttonRow back"><?php echo TITLE_CONTINUE_CHECKOUT_PROCEDURE . '<br />' . TEXT_CONTINUE_CHECKOUT_PROCEDURE; ?></div>

    </div>


    [/code]

  4. #4
    Join Date
    Feb 2006
    Location
    Chicago
    Posts
    1,162
    Plugin Contributions
    0

    Default Re: shopping cart contents text

    Line 134 should be
    <?php echo $stock_check[$i]; ?>
    Tutorials on Zen Cart
    http://tutorials.zen-cart.com/index.php
    ---------------
    advanced.programmer at gmail dot com
    In love with Zen Cart!!

  5. #5
    Join Date
    Apr 2006
    Posts
    25
    Plugin Contributions
    0

    Default Re: shopping cart contents text

    i dont think i changed it right, would you be able to show me the exact peice of code i need to replace? thanks so much

  6. #6
    Join Date
    Feb 2006
    Location
    Chicago
    Posts
    1,162
    Plugin Contributions
    0

    Default Re: shopping cart contents text

    Dont know how it got changed or its the solution but thats the way it is, since its an array
    Search for this line
    <?php echo $stock_check; ?>
    and replace it with
    <?php echo $stock_check[$i]; ?>
    Tutorials on Zen Cart
    http://tutorials.zen-cart.com/index.php
    ---------------
    advanced.programmer at gmail dot com
    In love with Zen Cart!!

  7. #7
    Join Date
    Apr 2006
    Posts
    25
    Plugin Contributions
    0

    Default Re: shopping cart contents text

    that seems to have fixed it! thank you so so much!

  8. #8
    Join Date
    Feb 2006
    Location
    Chicago
    Posts
    1,162
    Plugin Contributions
    0

    Default Re: shopping cart contents text

    No probs
    Are you sure during the upgrade you have overwritten all the required files mentioned in the instructions
    As you asked this issue might have come becuause in the old version it was a variable but in new version its an array. But then, its just my thought, I might be wrong!
    Tutorials on Zen Cart
    http://tutorials.zen-cart.com/index.php
    ---------------
    advanced.programmer at gmail dot com
    In love with Zen Cart!!

  9. #9
    Join Date
    Feb 2010
    Location
    Sri_lanka
    Posts
    26
    Plugin Contributions
    0

    Default Re: shopping cart contents text

    hi , i want ro display the item code of myproducts on both checkout and checkout confirmation pages. have managed to display it on shoping cart page...but cannot make it appears on others.item code is a new code adding through the admin when the products are going to add,and it saves in products_attributes table.

 

 

Similar Threads

  1. shopping cart contents
    By stitchnkitty in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 12 Nov 2009, 05:16 PM
  2. Shopping Cart Contents
    By grgolf in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 7 Dec 2008, 11:03 PM
  3. Shopping Cart Contents
    By metalarea in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 8 Sep 2007, 09:53 PM
  4. shopping cart contents
    By fakeDecoy in forum General Questions
    Replies: 1
    Last Post: 12 Aug 2007, 10:47 PM
  5. Show Contents of Shopping Cart
    By romdev in forum General Questions
    Replies: 3
    Last Post: 24 Feb 2007, 07: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