Guest on_way_to_fame Posted December 25, 2005 Share Posted December 25, 2005 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 Quote Link to comment Share on other sites More sharing options...
markscarts Posted December 25, 2005 Share Posted December 25, 2005 Hello Ash, tutorial "Manipulating Boxes in CubeCartâ„¢ v.3" http://cc3.biz/index.php?act=viewDoc&docId=5 Quote Link to comment Share on other sites More sharing options...
Guest on_way_to_fame Posted December 26, 2005 Share Posted December 26, 2005 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 Quote Link to comment Share on other sites More sharing options...
Guest on_way_to_fame Posted December 26, 2005 Share Posted December 26, 2005 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"> </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"> </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 Quote Link to comment Share on other sites More sharing options...
markscarts Posted December 26, 2005 Share Posted December 26, 2005 There are a couple small problems with the code. {links} doesn't belong there at all. I'm going to check the code right now, and get back to you :dizzy: Quote Link to comment Share on other sites More sharing options...
markscarts Posted December 26, 2005 Share Posted December 26, 2005 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"> </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"> </div> Quote Link to comment Share on other sites More sharing options...
Guest on_way_to_fame Posted December 26, 2005 Share Posted December 26, 2005 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 Quote Link to comment Share on other sites More sharing options...
markscarts Posted December 26, 2005 Share Posted December 26, 2005 (edited) 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 December 26, 2005 by markscarts Quote Link to comment Share on other sites More sharing options...
Guest vrakas Posted December 27, 2005 Share Posted December 27, 2005 -> Quote Link to comment Share on other sites More sharing options...
Guest on_way_to_fame Posted December 27, 2005 Share Posted December 27, 2005 Great Mark, Thanks very much for the help. Ash. Quote Link to comment Share on other sites More sharing options...
markscarts Posted December 27, 2005 Share Posted December 27, 2005 You're welcome ;) Quote Link to comment Share on other sites More sharing options...
Guest shaohaoshaohao Posted January 2, 2006 Share Posted January 2, 2006 You're welcome 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"> </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 Quote Link to comment Share on other sites More sharing options...
Guest Posted January 3, 2006 Share Posted January 3, 2006 Hello Ash, tutorial "Manipulating Boxes in CubeCartâ„¢ v.3" http://cc3.biz/index.php?act=viewDoc&docId=5 VERY good site!! Glad I found this post :) Quote 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.