Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

How to modify home page

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 01-11-2011, 08:08 PM
  kustomrides's Avatar 
kustomrides kustomrides is offline
 

eXpert
  
Join Date: Apr 2005
Location: Southern California
Posts: 212
 

Post How to modify home page

Is there a decoder ring I need to edit in the 4.4.x version? Ahem. (Webmaster mode and Firebug no help in divining location of secret files ... my test page is https://www.kustomrides.com/xcart/home.php ).

On my live page ( http://www.kustomrides.com/home.php ) I have modified the box borders with rounded corners, and inserted into home.tpl other boxes where ever I wanted.

Now I'm lost as to how to accomplish this under 4.4..x

I currently do it in home.tpl with:
{include file="box_top.tpl" }
<td valign="top"><div align="center">
Featured Image<br />
<a href="/Photos/art/medium/bpd_Audubon_18.jpg" target="_blank"><img src="/Photos/thumbs150/bpd_Audubon_18.jpg" alt="kustom rides" width="150" height="215" /></a>
<br />
</div>
</td>
{include file="box_bottom.tpl" }

the box tpl files call out the images used to make the round-corner box like so:
{* $Id: box_top.tpl,v 1.0 2007/01/10 16:47:44 bbb Exp $ *}
<table border="0" align="center" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td class="Diag01"></td>
<td class="Diag02"></td>
<td class="Diag03"></td>
</tr>
<tr>
<td class="Diag04"></td>
The diag classes are images.

Anyway, this is simple: insert this code anywhere I want in home.tpl

But now the 4.4.x home.tpl file wants DIV type classes and IDs, such as
<div id="content-container2">
{include file="customer/content.tpl"}
</div>

"content-container2" only controls placement and size. So I look at content.tpl and it refers to another div class, such as:
<div id="left-bar">
{include file="customer/left_bar.tpl"}
</div>

So I check out left_bar.tpl and IT calls out other files, such as:
{include file="customer/special.tpl"}


Other than 4.4's bread crumb trail, the main problem appears to be that I can't use my original code to insert my boxes (with what ever I want). I can't insert an image directly in home.tpl and it won't work in left_bar either. I did manage to insert Comodo's logo using their java command "COT("../Photos/gifs/cot.gif", "SC2", "none");"

Any ideas on how and where to modify the page box categories? This is needed to insert Google Adsense as well as modify the page look.

I think what xcart needs is a WYSIWYG editor. A real one, not that Webmaster Mode clunker. Where you can click on a page element and bring up the code and its location. Maybe something where you can toggle between raw code and display. Otherwise people will end up in a hit-or-miss hunt for what files is where affecting which other file.
__________________
x-cart Gold 4.7.4
RedHat Linux 7.2; Pearl 5.20.2; PHP 5.5.26; MySQL 5.6.27, server 5.1.54;
Ruby 2.1.5p273; Python 3.4.2;

Several mods in menu and skin, BSCE shipping-per-product, CDSEO Pro
Reply With Quote
  #2  
Old 01-12-2011, 12:57 PM
 
Sunray Sales Sunray Sales is offline
 

Senior Member
  
Join Date: Dec 2010
Posts: 194
 

Default Re: How to modify home page

In the admin section you need to search for Language variables.

this is where you can find the home.txt or txt_home. This is where I put all my code regarding the home page.

In addition webmaster tool does work as you said, it just takes some time getting used to.

I hope this helps.
__________________
4.4.2
www.sunraysales.com
HandsOnWebHosting
Reply With Quote
  #3  
Old 01-12-2011, 01:15 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: How to modify home page

home.tpl is not the right place - if you put it there, it will show EVERYWHERE. You want customer/main/welcome.tpl, and the language variables as mentioned above.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #4  
Old 01-12-2011, 02:27 PM
  kustomrides's Avatar 
kustomrides kustomrides is offline
 

eXpert
  
Join Date: Apr 2005
Location: Southern California
Posts: 212
 

Default Re: How to modify home page

Quote:
Originally Posted by balinor
home.tpl is not the right place - if you put it there, it will show EVERYWHERE. You want customer/main/welcome.tpl, and the language variables as mentioned above.

I want my modifications to show everywhere: That is, the Comodo secure logo shows throughout, as intended; while the rounded corners of the category boxes show when displayed.

The issue is WHERE are the files that control the skin? Currently I have the 3-column selection, which folder contains two files (altskin.ini and screenshot.png), so no help there.

I believe two of the files I'm looking to modify are left_bar.tpl, main.css -- creating new sidebar styles to replace the rectangular boxes with rounded ones. Used to be I could insert right into home.tpl but that won't work any more. It looks like the 4.4 iteration wants to work with DIV class and ids. Just a matter of tracking down where those are defined.

Would LOVE to have an Xplod type program where you could dig straight into the coding without having to go on a treasure hunt. Images, tpl and css files are all over the place from root to skin to common file folder. Not that I'm complaining or anything. Cough.
__________________
x-cart Gold 4.7.4
RedHat Linux 7.2; Pearl 5.20.2; PHP 5.5.26; MySQL 5.6.27, server 5.1.54;
Ruby 2.1.5p273; Python 3.4.2;

Several mods in menu and skin, BSCE shipping-per-product, CDSEO Pro
Reply With Quote
  #5  
Old 01-12-2011, 03:57 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: How to modify home page

Quote:
I want my modifications to show everywhere:


Then why did you title your post "How to modify home page"?

You need to use webmaster mode to figure out what templates are what - and firebug to determine which css classes control what.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #6  
Old 01-12-2011, 04:46 PM
  kustomrides's Avatar 
kustomrides kustomrides is offline
 

eXpert
  
Join Date: Apr 2005
Location: Southern California
Posts: 212
 

Default Re: How to modify home page

Quote:
Originally Posted by balinor
Then why did you title your post "How to modify home page"?

You need to use webmaster mode to figure out what templates are what - and firebug to determine which css classes control what.

Home page as in home.tpl

I seem to have better luck using page source and Dreamweaver than Webmaster and Firebug to follow the new bread crumb trail. I'll get there.
__________________
x-cart Gold 4.7.4
RedHat Linux 7.2; Pearl 5.20.2; PHP 5.5.26; MySQL 5.6.27, server 5.1.54;
Ruby 2.1.5p273; Python 3.4.2;

Several mods in menu and skin, BSCE shipping-per-product, CDSEO Pro
Reply With Quote
  #7  
Old 01-19-2011, 11:07 AM
  kustomrides's Avatar 
kustomrides kustomrides is offline
 

eXpert
  
Join Date: Apr 2005
Location: Southern California
Posts: 212
 

Default Re: How to modify home page

OK, here is the solution to modifying the home page, esp. regarding the design of the boxes:

1. Over at the UK xcart forums, this excellent post:
http://www.xcartmods.co.uk/snippet-css-rounded-corners.html

The files affected are skin/common_files/css/main.css, skin/common_files/customer/dialog.tpl, skin/common_files/customer/menu_dialog.tpl. These file names don't all appear using Webmaster mode or Firebug, unless I'm missing some other feature.

2. skin/common_files/customer/home.tpl is used for things like your SSL cert ... you can also modify it for other things, but the 4.4 branch is now relying on other called out files. So you just have to research down the tree to find out which files to modify.

Regarding the rounded corners mod, you have to change the fill color in the css code unless you want white. Here it's changed to light yellow:
http://www.kustomrides.com/xcart/home.php
The rounded corners now appear across various browsers.
__________________
x-cart Gold 4.7.4
RedHat Linux 7.2; Pearl 5.20.2; PHP 5.5.26; MySQL 5.6.27, server 5.1.54;
Ruby 2.1.5p273; Python 3.4.2;

Several mods in menu and skin, BSCE shipping-per-product, CDSEO Pro
Reply With Quote
  #8  
Old 01-19-2011, 12:16 PM
  gb2world's Avatar 
gb2world gb2world is offline
 

X-Wizard
  
Join Date: May 2006
Location: Austin, TX
Posts: 1,970
 

Default Re: How to modify home page

Quote:
names don't all appear using Webmaster mode or Firebug

main.css ->In Firebug - look in the Style tab - which is the default window than displays on the right side. The css files are listed on the right. You can mouse over them to see the full path to css files

dialog.tpl and menu_dialog.tpl - Do show up in webmaster mode. But - they are a little unusual in that they could be called more than once on the page. So, when you mouse over them - the borders can show up on several places on the page. This lets you know that if you change them - your changes impact in more than one place on the page.

---
__________________
X-CART (4.1.9,12/4.2.2-3/4.3.1-2/4.4.1-5)-Gold
(CDSEO, Altered-Cart On Sale, BCSE Preorder Backorder, QuickOrder, X-Payments, BCSE DPM Module)
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 01:19 PM.

   

 
X-Cart forums © 2001-2020