Jump to content

adding a new box


Guest on_way_to_fame

Recommended Posts

Guest on_way_to_fame

Hi,

I was just wondering, what's the easiest way to add a new box in the latest version of Cube Cart. Basically what i want to do is add a new box under the shopping basket box, with some links?

Thanks

Ash

Link to comment
Share on other sites

Guest on_way_to_fame

Thanks mark.

A very helpful tutorial indeed.

Hi Mark, I was just going through the tutorial, and in regard to following extract

<div class="boxTitleLeft">{LANG_CATEGORY_TITLE}</div> Here is a division that sets the

look of the box title bar. The class, .boxTitleLeft is defined in the stylesheet, layout.css. If you

look at layout.css you’ll see where font styles and sizes, background colors and images, border

sizes and colors, etc. are specified for .boxTitleLeft to make the box title appear as it does in

your store. If you were to remove the {LANG_CATEGORY_TITLE} from that code, and replace it

with the words, “My Wild Website,†then the category box would remain on your site but the title

would now say “My Wild Website†instead of “Shop by Category.†So, you can change the

properties of the box title in layout.css, and you can change the text that goes there so that it

reads anyway you want.

I was just wondering, if I want to change the title by editing the language file, rather than here, which file will I need to edit, in other words, where can I find the Language file which contains these titles, etc.

Thanks

Ash

Link to comment
Share on other sites

Guest on_way_to_fame

Hi Mark,

After following the tutorial I tried adding a new box with some success.

As mentioned in the tutorial, does the following new code need to go into index.tpl ?

{SALE_ITEMS}

<div class=â€boxTitleRightâ€>Your Title Text Here</div>

<div class=â€boxContentRightâ€>

<div class=â€txtDefaultâ€>

Your content text and links go here

</div>

</div>

<div class="boxFootRight">&nbsp;</div>

{MAIL_LIST}

That's what I did, and the code I added looks like this,

{CATEGORIES}

<table border="0" cellspacing="0" width="100%" cellpadding="0">

<tr valign="top">

<td width="175">

{Links}

<div class=â€boxTitleLeftâ€>Navigation</div>

<div class=â€boxContentLeftâ€>

<div class=â€txtDefaultâ€>

<A HREF=http://www.stylevolume.com/index.php?act=viewDoc&docId=6>Prices and Terms</A>

</div>

</div>

<div class="boxFootLeft">&nbsp;</div>

{SHOPPING_CART}

{SEARCH_FORM}

{INFORMATION}

{CURRENCY}

{LANGUAGE}</td>

The link text and the link is working fine, but the borders, the title, etc. do not have the same formatting as the other boxes (as can be seen on the front page top right on www.stylevolume.com) . Do I need to edit some other file too, or is there a problem with my code?

Thanks

Ash

Link to comment
Share on other sites

It should look like this:

{CATEGORIES}

<table border="0" cellspacing="0" width="100%" cellpadding="0">

<tr valign="top">

<td width="175">

<div class="boxTitleRight">Navigation</div>

<div class="boxContentRight">

<ul>

<li class="bullet"><a href="http://www.stylevolume.com/index.php?act=viewDoc&docId=6" class="txtDefault">Prices and Terms</a></li>

</ul>

</div>

<div class="boxFootLeft">&nbsp;</div>

The code above is applicable to the Killer skin, and will place you links in an unordered list; i.e., the link will be listed with a bullet in front:

• Prices and Terms

To make new links, repeat this line and change the URL and the link text:

<li class="bullet"><a href="http://www.stylevolume.com/index.php?act=viewDoc&docId=6" class="txtDefault">Prices and Terms</a></li>

Or, to make your links in this box appear without the bullets, just remove the bits in red below:

{CATEGORIES}

<table border="0" cellspacing="0" width="100%" cellpadding="0">

<tr valign="top">

<td width="175">

<div class="boxTitleRight">Navigation</div>

<div class="boxContentRight">

<ul>

<li class="bullet"><a href="http://www.stylevolume.com/index.php?act=viewDoc&docId=6" class="txtDefault">Prices and Terms</a></li>

</ul>

</div>

<div class="boxFootLeft">&nbsp;</div>

Link to comment
Share on other sites

Guest on_way_to_fame

Thanks Mark..Works great now.

I was just going through the tutorial, and in regard to following extract

<div class="boxTitleLeft">{LANG_CATEGORY_TITLE}</div> Here is a division that sets the

look of the box title bar. The class, .boxTitleLeft is defined in the stylesheet, layout.css. If you

look at layout.css you’ll see where font styles and sizes, background colors and images, border

sizes and colors, etc. are specified for .boxTitleLeft to make the box title appear as it does in

your store. If you were to remove the {LANG_CATEGORY_TITLE} from that code, and replace it

with the words, “My Wild Website,†then the category box would remain on your site but the title

would now say “My Wild Website†instead of “Shop by Category.†So, you can change the

properties of the box title in layout.css, and you can change the text that goes there so that it

reads anyway you want.

I was just wondering, if I want to change the title by editing the language file, rather than here, which file will I need to edit, in other words, where can I find the Language file which contains these titles, etc.

Thanks

Ash

Link to comment
Share on other sites

To edit the language file:

From the store root path, open the file language/en/lang.inc.php - substituting "en" for any language there you wish to work in.

Next, search for the text you wish to change as it appears in your store. (This is a very large file; use the search function in your text editor.)

Replace the text between double quote marks on the right side of the equation only. Shun special characters in your new text unless you are familiar with escaping special characters.

That's it. Remember that when you upgrade the store version, lang.inc.php will generally be overwritten as it is a core file. You will have to either not upgrade this file, or go back and re-do any changes you make to it after upgrading.

BTW - The example given in that tutorial was given for the purpose of showing people where the title comes from, and how easily it is altered. As to actually changing titles that way, the rule would be that if you are developing a special skin and wish to make skin-specific changes, you can hard-code a title, or practically anything else for that matter, into the skin template. On the other hand, if you wish to make changes in standard text that will remain even when you change skins, then you would go to the store's core language file and make the changes there - they will be applied across the board, regardless of which skin is chosen. :w00t:

Edited by markscarts
Link to comment
Share on other sites

Guest shaohaoshaohao

You're welcome :D

hello... i have trouble putting in pics or even banners..... need help

{CATEGORIES}

<table border="0" cellspacing="0" width="100%" cellpadding="0">

<tr valign="top">

<td width="175">

<div class="boxTitleRight">Goodwill Birds</div>

<div class="boxContentRight">

<div style=â€text-align: centerâ€>

<img src=â€images/uploads/00669855_g_r7_c6_f2.jpg ">

</div>

</div>

<div class="boxFootLeft">&nbsp;</div>

{SHOPPING_CART}

<div class="boxTitleRight">Navigation</div>

the pic show a red cross there.....

help me thanks a lot...

the border is also out of place

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