Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

No shippingmethod description on the invoice?!


Orpian

Recommended Posts

Posted

Hi everyone!

 

I'm new here, and I hope someone could help me. I've been searching for this but didn't found anything..

 

My problem:

 

I would like to remove the extra description for the shipping methods on the actual invoice, as well as in checkout_confirmation.

Let my show you why:

 

verzendmethoden.jpg

 

As you can see, I have a pretty long description for every shipping method I offer. But, OSC also print this description on the invoice. And with such a long description, it really messes the layout of the invoice & page up!

Hope someone can help me?

Thank you very much (and sorry for my bad english..)

 

Greets from Belgium

  • 1 year later...
Posted

figured it out.

 

1. edit checkout_shipping.php around line 134 find;

		  $shipping = array('id' => $shipping,
						    'title' => (($free_shipping == true) ?  $quote[0]['methods'][0]['title'] : $quote[0]['module'] . ' (' . $quote[0]['methods'][0]['title'] . ')'),
						    'cost' => $quote[0]['methods'][0]['cost']);

and replace it with

		  $shipping = array('id' => $shipping,
						    'title' => (($free_shipping == true) ?  $quote[0]['methods'][0]['title'] : $quote[0]['module']),
						    'title_long_desc' => (($free_shipping == true) ?  $quote[0]['methods'][0]['title'] : $quote[0]['module'] . ' (' . $quote[0]['methods'][0]['title'] . ')'),
						    'cost' => $quote[0]['methods'][0]['cost']);

 

2. edit includes/classes/order.php around line 220, find the array like this

  $this->info = array('order_status' => DEFAULT_ORDERS_STATUS_ID,
					  'currency' => $currency,
					  'currency_value' => $currencies->currencies[$currency]['value'],
					  'payment_method' => $payment,
					  'cc_type' => '',
					  'cc_owner' => '',
					  'cc_number' => '',
					  'cc_expires' => '',
					  'shipping_method' => $shipping['title'],
					  'shipping_cost' => $shipping['cost'],
					  'subtotal' => 0,
					  'tax' => 0,
					  'tax_groups' => array(),
					  'comments' => (tep_session_is_registered('comments') && !empty($comments) ? $comments : ''),
					  );

add this 'shipping_method_long_desc' => $shipping['title_long_desc'], just after 'shipping_method' => $shipping['title'], to get this

  $this->info = array('order_status' => DEFAULT_ORDERS_STATUS_ID,
					  'currency' => $currency,
					  'currency_value' => $currencies->currencies[$currency]['value'],
					  'payment_method' => $payment,
					  'cc_type' => '',
					  'cc_owner' => '',
					  'cc_number' => '',
					  'cc_expires' => '',
					  'shipping_method' => $shipping['title'],
                         'shipping_method_long_desc' => $shipping['title_long_desc'],
					  'shipping_cost' => $shipping['cost'],
					  'subtotal' => 0,
					  'tax' => 0,
					  'tax_groups' => array(),
					  'comments' => (tep_session_is_registered('comments') && !empty($comments) ? $comments : ''),
					  );

 

3. Edit checkout_confirmation.php around line 140 find

<?php
   if ($order->info['shipping_method']) {
?>
	  <tr>
	    <td><?php echo '<strong>' . HEADING_SHIPPING_METHOD . '</strong> <a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '"><span class="orderEdit">(' . TEXT_EDIT . ')</span></a>'; ?></td>
	  </tr>
	  <tr>
	    <td><?php echo $order->info['shipping_method']; ?></td>
	  </tr>

 

replace with

<?php
   if ($order->info['shipping_method']) {
?>
	  <tr>
	    <td><?php echo '<strong>' . HEADING_SHIPPING_METHOD . '</strong> <a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '"><span class="orderEdit">(' . TEXT_EDIT . ')</span></a>'; ?></td>
	  </tr>
	  <tr>
	    <td><?php echo $order->info['shipping_method_long_desc']; ?></td>
	  </tr>

 

 

Thats it. By adding the 'shipping_method_long_desc' you can maintain the full description under the Delivery Information -> Delivery Method but remove the description half from your order total.

 

the shipping method description will no longer display on invoices, emails, or orders page. If you want to add the long description, find the info['shipping_method'] and add the _long_desc to it. simple right? (to bad it took the better part of 2 days to figure this out)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...