Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Modifying checkout_shipping.php


christiansees

Recommended Posts

Hello All,

I am trying to add a warning message to the checkout_shipping.php page and would like a second opinion about my code this maybe useful to anyone wishing to do the same. On the Catalog/checkout_shipping.php between lines 309 and 310 I have added this code

	if (module=usps && ($order->delivery['country_id'] != STORE_COUNTRY)){
?>
		  <tr>
				<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
				<td class="main" colspan="3"><?php echo TEXT_ENTER_SHIPPING_WARNING; ?></td>
				<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
		  </tr>
<?php
}

And on line 29 of Catalog/includes/languages/english/checkout_shipping.php I have added

define('TEXT_ENTER_SHIPPING_WARNING', 'We can NOT ship LPs or any vinyl Global Priority Mail choose another method');

What I hope to accomplish is if the customer is shipping internationally and using USPS that this warning message will display. Please let me know if you think my code will work, or what my errors are.

This can be used by anyone you would just have to change the conditions of the if statement to suit your needs and the text of the warning message.

Thanks

Christian

On your last day only you will have to approve or disaprove of how your life has been.

Link to comment
Share on other sites

Found another error in my if statement should be

	if (['module']==usps && ($order->delivery['country_id'] != STORE_COUNTRY)){

Any responce from others would be nice.

On your last day only you will have to approve or disaprove of how your life has been.

Link to comment
Share on other sites

Found another error in my if statement should be

	if (['module']==usps && ($order->delivery['country_id'] != STORE_COUNTRY)){

Any responce from others would be nice.

Have you tried using a debugger to check to make sure the vars ['module'] and $order->delivery['country_id'] contain the data you think they do??

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...