Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / General Questions / General Questions / Can I add 'manufacturer name' and 'unit price' info to checkout confirmation page?

Can I add 'manufacturer name' and 'unit price' info to checkout confirmation page?

29 Mar 2013, 12:30 PM
#1
tracey avatar

tracey

New Zenner

Join Date:
Jan 2008
Location:
Switzerland
Posts:
38
Plugin Contributions:
0

Post #1 by tracey

ZC Version: 1.3.9h
PHP: 5.2.17
MySQL: 5.1.68-cll
Site URL: w w w . t e m p o r a r y - t a t t o o s - s y d n e y . c o m . a u

Hi,

I am trying to customise my checkout confirmation page at 'Step 3 of 3' of checkout (index.php?main_page=checkout_confirmation). I've researched a lot on Google and in the Zen Cart forum, and found some very helpful posts that showed how to do some of my customisations. But I still am unable to do a couple of changes.

I have already made changes to the default file, including adding an images column and a model column (named 'ID') which were successful.

However, I would also love to be able to add the 'manufacturers name', as well as the 'unit price', in separate columns, but I don't know enough PHP / SQL to do this. If anyone knows how to do this, I would be very grateful or if you can point me in the right direction of how to do this that would be great.

Here is a copy of the code that I have already altered in the includes/templates/CUSTOM_TEMPLATE/checkout_confirmation.php file:

      <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_IMAGE; ?></th>
        <th scope="col" id="ccProductsHeading"><?php echo TABLE_HEADING_PRODUCTS; ?></th>
        <th scope="col" id="ccProductsHeading"><?php echo TABLE_HEADING_MODEL; ?></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 $order->products[$i]['rowClass']; ?>">
          <td  class="cartQuantity"><?php echo $order->products[$i]['qty']; ?> x</td>


<td class="cartProductDisplay"><?php echo zen_get_products_image($order->products[$i]['id'], $width = 80, $height = 80) ?><br /></td>

<td class="cartProductDisplay">
<?php echo $order->products[$i]['name']; ?><br /><br /><br /><br /><br /></td>

<td class="cartProductDisplay">
<?php echo $order->products[$i]['model']; ?><br /><br /><br /><br /><br /><br />
</td>



          <?php  echo $stock_check[$i]; ?>

<?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 class="cartAttribsList">';
      for ($j=0, $n2=sizeof($order->products[$i]['attributes']); $j<$n2; $j++) {
?>
      <li><?php echo $order->products[$i]['attributes'][$j]['option'] . ': ' . nl2br(zen_output_string_protected($order->products[$i]['attributes'][$j]['value'])); ?></li>
<?php
      } // end loop
      echo '</ul>';
    } // endif attribute-info
?>
        </td>

Screenshot of current order confirmation layout:
Attachment 12253

Tracey Haas
Temporary Tattoos

9 Apr 2013, 5:55 PM
#2
tracey avatar

tracey

New Zenner

Join Date:
Jan 2008
Location:
Switzerland
Posts:
38
Plugin Contributions:
0

Post #2 by tracey

Anybody know how to do this?

Tracey Haas
Temporary Tattoos

30 Apr 2013, 9:41 PM
#3
tracey avatar

tracey

New Zenner

Join Date:
Jan 2008
Location:
Switzerland
Posts:
38
Plugin Contributions:
0

Post #3 by tracey

Hey, bumping this thread to see if anyone has an answer to this riddle... :)

Tracey Haas
Temporary Tattoos

30 Apr 2013, 10:59 PM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Post #4 by ajeh

For the prices, and you will need to make these look right, you could use in your templates and overrides for:
/includes/templates/your_templates_dir/tpl_checkout_confirmation_default.php

          <td class="cartProductDisplay"><?php echo $order->products[$i]['name'] . ' - ' . $order->products[$i]['final_price'] . ' - ' . $order->products[$i]['onetime_charges']; ?>

You would need to add in there formatting for the currency/display and on the One Time charge, only display that if > 0 etc.

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

30 Apr 2013, 11:01 PM
#5
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Post #5 by ajeh

If you need manufacturers_name, you can use the function:
zen_get_products_manufacturers_name($your_products_id)

where in this case the $your_products_id would be:
$order->products[$i]['id']

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!