Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

New Line !!


Pigsfoot

Recommended Posts

Hi, I quite new to php coding and all I want to do is start a new line within a define field. The line is below

 

define('MODULE_SHIPPING_DLY_TEXT_WAY', 'Delivered direct by your local store within a 5 mile radius. All orders placed before 14:00 will be delivered the same day.');

 

I want to split the text up so that it is on two lines due to restrictions on my box size.

 

I have tried /n and <br> but they don't work, which may be just to do where I put the code !!

 

What i want to achieve is

 

Delivered direct by your local store within a 5 mile radius.

All orders placed before 14:00 will be delivered the same day.

 

Easy to someone who knows PHP....I?m sure

 

Any advice is much appreciated.

Link to comment
Share on other sites

Thanks for the quick reply Tom,

 

I have only tried \n, but to be honest i'm not sure where to put it.

 

I did try the following,

 

define('MODULE_SHIPPING_DLY_TEXT_WAY', 'Delivered direct by your local store within a 5 mile radius.' \n 'All orders placed before 14:00 will be delivered the same day.');

 

But just got an error....if possible can you let me know what i should be putting in.

 

Thanks....Rod

Link to comment
Share on other sites

Loose the single quotes.

 

Try

 

define('MODULE_SHIPPING_DLY_TEXT_WAY', 'Delivered direct by your local store within a 5 mile radius.\nAll orders placed before 14:00 will be delivered the same day.');

 

 

or

 

define('MODULE_SHIPPING_DLY_TEXT_WAY', 'Delivered direct by your local store within a 5 mile radius.\n\rAll orders placed before 14:00 will be delivered the same day.');

Link to comment
Share on other sites

Cheers Tom,

 

I have tried both options and all that happens is the \n or \n\r is just displayed as text.......

 

I have looked at a couple of things on the net and those options only seem to work when the text is within " " not as a define field...with the text in single '

 

Thanks for your help so far....any other input woudl be much appreciated

Link to comment
Share on other sites

I could not find MODULE_SHIPPING_DLY_TEXT_WAY in the standard osc modules for shipping.

 

If you have a contribution installed then you'll need to get at the php code where the define is used and change the text display there.

 

Good Luck, maybe someone else recognizes MODULE_SHIPPING_DLY_TEXT_WAY, no threads on the forum have via the search.

 

Tom

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...