Forums / Templates, Stylesheets, Page Layout / Added verbage to shopping cart, how do I do it the right way?

Added verbage to shopping cart, how do I do it the right way?

Locked

Started by plsony on 16 Feb 2010, 6:34 PM · Views: 738

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
16 Feb 2010, 6:34 PM
#1
plsony avatar

plsony

New Zenner

Join Date:
Jul 2009
Posts:
54
Plugin Contributions:
0

Added verbage to shopping cart, how do I do it the right way?

I added some text to the shopping cart page using HTML, just plopped it into the top of shopping_cart.php in my template.

You need to add a product to see the page.

http://www.midwestnotebooks.com/index.php?main_page=shopping_cart

To add more items click Continue Shopping.

To delete items from your cart hit the red "X".

To change quantity, edit qty. box and click the green refresh arrows.

How do I do it the right way? Using .php commands?

16 Feb 2010, 6:54 PM
#2
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Added verbage to shopping cart, how do I do it the right way?

The proper place to add commentary (and it can be html formatted) is in includes/languages/english/shopping_cart.php

The defines are added to:

define('TEXT_INFORMATION', 'Your Text Here');

Once you've made the changes, the file should be saved to your over-ride folder:-

includes/languages/english/YOUR_TEMPLATE/shopping_cart.php

20 years a Zencart User

16 Feb 2010, 7:14 PM
#3
plsony avatar

plsony

New Zenner

Join Date:
Jul 2009
Posts:
54
Plugin Contributions:
0

Re: Added verbage to shopping cart, how do I do it the right way?

Thanks,

That is where I put the HTML.

Can I have multiple lines of define('TEXT_INFORMATION') and in multiple places?

16 Feb 2010, 7:20 PM
#4
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Added verbage to shopping cart, how do I do it the right way?

It all appears in one place, but you can split lines using <br /> tags.

If you want to position bits of text around the cart page, you will need to edit its template.

If you follow the php conventions used for "echoing" such defines (use the above as a guide) then you will have done this properly.

Hard-coding the template file (while effective) is bad protocol.

20 years a Zencart User

16 Feb 2010, 8:03 PM
#5
plsony avatar

plsony

New Zenner

Join Date:
Jul 2009
Posts:
54
Plugin Contributions:
0

Re: Added verbage to shopping cart, how do I do it the right way?

Thanks,

Thats great.

How do I place an image using .php instead of HTML as seen in the credit logos below the cart?