Jump to content
Sign in to follow this  
christiansees

Modifying checkout_shipping.php

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.

Share this post


Link to post
Share on other sites

Woops change the if statement to

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


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

Share this post


Link to post
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.

Share this post


Link to post
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??

Share this post


Link to post
Share on other sites

menriquez thanks for your responce. I wish I could take your suggestion but I don't have PHP on a development box.


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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×