Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Creating Return in PHP


FantasyArt

Recommended Posts

I am trying to create a return at the end of a line in the Flat.php

 

I start off with this below and want to put a return after the Local to SHEPPARTON, VICTORIA REGION ONLY!!

 

 

<?php

/*

$Id$

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2002 osCommerce

 

Released under the GNU General Public License

*/

 

define('MODULE_SHIPPING_FLAT_TEXT_TITLE', 'Local to SHEPPARTON, VICTORIA REGION ONLY!!');

define('MODULE_SHIPPING_FLAT_TEXT_DESCRIPTION', 'Local to SHEPPARTON, VICTORIA REGION ONLY!!');

define('MODULE_SHIPPING_FLAT_TEXT_WAY', 'LOCAL PICKUP OPTION');

?>

 

Below is the code I enter but keep on getting it wrong. New to editing PHP files so need some help as to know what I am doing wrong.

 

 

<?php

/*

$Id$

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2002 osCommerce

 

Released under the GNU General Public License

*/

 

define('MODULE_SHIPPING_FLAT_TEXT_TITLE', 'Local to SHEPPARTON, VICTORIA REGION ONLY!!');

define('MODULE_SHIPPING_FLAT_TEXT_DESCRIPTION', 'Local to SHEPPARTON, VICTORIA REGION ONLY!!'\rWe reserve the right to cancel any orders outside the PICKUP AREA stated above that don't include shipping.);

define('MODULE_SHIPPING_FLAT_TEXT_WAY', 'LOCAL PICKUP OPTION');

?>

 

 

Keep on getting an error for this so I know I am doing something wrong but don't know what.

 

PLEASE HELP

 

I am also trying to get help on another post I have in the forum as to which module is the best and easiest to install for Guest Checkout. Would like some help on both these matters please.

Link to comment
Share on other sites

define('MODULE_SHIPPING_FLAT_TEXT_DESCRIPTION', 'Local to SHEPPARTON, VICTORIA REGION ONLY!!<br>
We reserve the right to cancel any orders outside the PICKUP AREA stated above that don\'t include shipping.');

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

1. Use \n to mark the end of a line (newline).

2. \ escapes aren't recognized if your string is enclosed in single quotes. 'line 1\nline 2' is no good. You need double quotes (quotation marks "): "line 1\nline2".

3. Any ' inside a '-delimited string need to be escaped \'

 

define('MODULE_SHIPPING_FLAT_TEXT_DESCRIPTION', "Local to SHEPPARTON, VICTORIA REGION ONLY!!\nWe reserve the right to cancel any orders outside the PICKUP AREA stated above that don't include shipping.");

or

define('MODULE_SHIPPING_FLAT_TEXT_DESCRIPTION', 'Local to SHEPPARTON, VICTORIA REGION ONLY!!' . "\n" . 'We reserve the right to cancel any orders outside the PICKUP AREA stated above that don\'t include shipping.');

Link to comment
Share on other sites

Am I adding it to the right line as it doesn't display anything when I copy and paste the lines you have stated.

 

In the code below where should I paste the modified statements that you have provided me.

 

 

<?php

/*

$Id$

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2002 osCommerce

 

Released under the GNU General Public License

*/

 

define('MODULE_SHIPPING_FLAT_TEXT_TITLE', 'Local to SHEPPARTON, VICTORIA REGION ONLY!!');

define('MODULE_SHIPPING_FLAT_TEXT_DESCRIPTION', 'Local to SHEPPARTON, VICTORIA REGION ONLY!!');

define('MODULE_SHIPPING_FLAT_TEXT_WAY', 'LOCAL PICKUP OPTION');

?>

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...