christiansees Posted February 7, 2006 Share Posted February 7, 2006 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 Quote 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 More sharing options...
christiansees Posted February 7, 2006 Author Share Posted February 7, 2006 Woops change the if statement to if (['module']=usps && ($order->delivery['country_id'] != STORE_COUNTRY)){ Quote 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 More sharing options...
christiansees Posted February 7, 2006 Author Share Posted February 7, 2006 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. Quote 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 More sharing options...
Guest Posted February 8, 2006 Share Posted February 8, 2006 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?? Quote Link to comment Share on other sites More sharing options...
christiansees Posted February 9, 2006 Author Share Posted February 9, 2006 menriquez thanks for your responce. I wish I could take your suggestion but I don't have PHP on a development box. Quote 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 More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.