X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   trying to edit home.tpl (https://forum.x-cart.com/showthread.php?t=8290)

rafaes18 06-29-2004 07:04 AM

trying to edit home.tpl
 
Every time I try to edit home tpl the whole site disapears.

The pages are there but nothing appears on the screen.

All I am trying to do it to add a javascript rollover and to ask the page to preload the images onload.

any ideas why this is happening?

rafa

adpboss 06-29-2004 08:03 AM

Is your javascript enclosed in {literal} JAVASCRIPT HERE {/literal} tags?

rafaes18 06-29-2004 09:19 AM

No

How should it be?

Can you give me a reference of where can I find a good tutorial on customising xcart?

thanks for the tip

rafa

adpboss 06-29-2004 10:58 AM

http://forum.x-cart.com/viewtopic.php?t=6489

You need to do some reading and searching for javascript my friend.

Good luck.

rafaes18 06-29-2004 12:13 PM

fair enough

and thank you

do you know if a step by step guide for developers exist?

thanks again

rafa

adpboss 06-29-2004 12:14 PM

Read the Forum FAQ area.

There is no step by step guide, you will need to know html, Smarty and PHP to make substantial changes to your store.

Assistance can be had here, but it would help if you added your version to your forum signature and searched before posting.

rafaes18 06-29-2004 12:34 PM

sorry I thought I had change the signature.

I am fluent in php and html. Smarty is new for me.

I am going to try again and I'll seek help when I need it.

wish me luck

rafael

adpboss 06-29-2004 12:37 PM

Here's some help

http://smarty.php.net

It's easy to learn smarty if you understand the other two.

rafaes18 06-29-2004 12:44 PM

thanks

now with signature

rafaes18 06-29-2004 01:42 PM

thanks to your help I have managed to change a few things in the cart

www.maybegoodforyou.com/shop

and also, I have a few other quetions.

where can I change the menus that appear in both sides of the page?

thank you

rafael

rafaes18 06-29-2004 02:37 PM

sorry I should be a bit more specific.

I think I am getting somewhere nowbut there are two bits I can't find.

1- the green boxes on the left, where say categories, special and help. these boxes are a bit to the right. If I look at the html source it says width="80%". How can I get rid of the gap?

2- in the central pane I have a orange box that I would like to change to green. Do you know where is this comming from?

thanks again for your help

rafael

adpboss 06-29-2004 04:01 PM

You need to learn how to use webmaster mode. It will help you find your way through templates quickly and easily.

Just turn on webmaster mode in the admin and then open your customer front end in a new window.

1. Can you post your home.tpl code here? Please post it between
Code:

your home.tpl here
tags. Thanks.

2. Dialogue border in css, and the top of that box is an image in your skin1/images folder. You will have to modify it to a new colour of your choice using some image editing software.

rafaes18 06-30-2004 02:45 AM

Thank you adpboss

your help is most appreciated.

the content of my home.tpl file is
Code:

{* $Id: home.tpl,v 1.56.2.2 2003/06/24 12:56:32 svowl Exp $ *}
{ config_load file="$skin_config" }
<html>
<head>
<title>{$lng.txt_site_title}</title>
{ include file="meta.tpl" }
{literal}
<script language="JavaScript">
<!--
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
  if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
  var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
  if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

//-->
</script>
{/literal}
<link rel="stylesheet" href="{$SkinDir}/{#CSSFile#}">
</head>
<body LEFTMARGIN=0 TOPMARGIN=0 RIGHTMARGIN=0 BOTTOMMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0 onLoad="MM_preloadImages('{$SkinDir}/images/template_r3_c2_f2.jpg','{$SkinDir}/images/template_r3_c3_f2.jpg','{$SkinDir}/images/template_r3_c4_f2.jpg','{$SkinDir}/images/template_r3_c5_f2.jpg','{$SkinDir}/images/template_r3_c7_f2.jpg','{$SkinDir}/images/template_r3_c8_f2.jpg','{$SkinDir}/images/template_r3_c9_f2.jpg','{$SkinDir}/images/template_r3_c10_f2.jpg','{$SkinDir}/images/template_r3_c11_f2.jpg','{$SkinDir}/images/template_r3_c13_f2.jpg')">
{ include file="rectangle_top.tpl" }
{ include file="head.tpl" }

<table border=0 width="760" cellpadding=0 cellspacing=0 align="center">
<tr>
<td class=VertMenuBox width=6></td>
<td class=VertMenuBox width=150 valign=top>
{if $login eq "" }
{ include file="auth.tpl"}
{else}
{ include file="admin/menu.tpl"}


{ include file="provider/menu.tpl" }
{/if}


{ include file="help.tpl" }
</td>
<td width=20></td>
<td valign=top>

{if $smarty.get.mode eq "subscribed"}
{include file="main/subscribe_confirmation.tpl"}

{elseif $main eq "product_links"}
{include file="admin/main/product_links.tpl"}

{elseif $main eq "general_info"}
{include file="admin/main/general.tpl"}

{elseif $main eq "vat_rates"}
{include file="provider/main/vat_rates.tpl"}

{elseif $main eq "pages"}
{include file="admin/main/pages.tpl"}
 
{elseif $main eq "page_edit"}
{include file="admin/main/page_edit.tpl"}

{elseif $main eq "countries_edit"}
{include file="admin/main/countries.tpl"}

{elseif $main eq "images_location"}
{include file="admin/main/images_location.tpl"}

{elseif $main eq "atracking"}
{include file="admin/main/atracking.tpl"}

{elseif $main eq "shipping_markups"}
{include file="provider/main/shipping_markups.tpl"}

{elseif $main eq "shipping_options"}
{include file="admin/main/shipping_options.tpl"}

{elseif $main eq "subscriptions"}
{include file="modules/Subscriptions/subscriptions_admin.tpl"}

{elseif $main eq "languages"}
{include file="admin/main/languages.tpl"}

{elseif $main eq "banner_info"}
{include file="main/banner_info.tpl"}

{elseif $main eq "memberships"}
{include file="admin/main/memberships.tpl"}

{elseif $main eq "card_types"}
{include file="admin/main/card_types.tpl"}

{elseif $main eq "partner_report"}
{include file="admin/main/partner_report.tpl"}

{elseif $main eq "partner_plans"}
{include file="admin/main/partner_plans.tpl"}

{elseif $main eq "partner_plans_edit"}
{include file="admin/main/partner_plans_edit.tpl"}

{elseif $main eq "partner_banners"}
{include file="admin/main/partner_banners.tpl"}

{elseif $main eq "commissions"}
{include file="admin/main/partner_commissions.tpl"}

{elseif $main eq "payment_upload"}
{include file="admin/main/payment_upload.tpl"}

{elseif $main eq "payment_history"}
{include file="admin/main/payment_history.tpl"}

{elseif $smarty.get.mode eq "unsubscribed"}
{include file="main/unsubscribe_confirmation.tpl"}

{elseif $main eq "search"}
{include file="main/search_result.tpl"}

{elseif $main eq "categories"}
{include file="admin/main/categories.tpl"}

{elseif $main eq "modules"}
{include file="admin/main/modules.tpl"}

{elseif $main eq "payment_methods"}
{include file="admin/main/payment_methods.tpl"}

{elseif $main eq "cc_processing"}
{include file=$processing_module }

{elseif $main eq "edit_file"}
{include file="admin/main/edit_file.tpl"}

{elseif $main eq "edit_file_message"}
{include file="admin/main/edit_file_message.tpl"}

{elseif $main eq "new_file_message"}
{include file="admin/main/new_file_message.tpl"}

{elseif $main eq "delete_file_message"}
{include file="admin/main/delete_file_message.tpl"}

{elseif $main eq "upload_file_message"}
{include file="admin/main/upload_file_message.tpl"}

{elseif $main eq "copy_file_message"}
{include file="admin/main/copy_file_message.tpl"}

{elseif $main eq "edit_dir"}
{include file="admin/main/edit_dir.tpl"}

{elseif $main eq "countries"}
{include file="provider/main/countries.tpl"}

{elseif $main eq "import_images"}
{include file="provider/main/import_images.tpl"}

{elseif $main eq "statistics"}
{include file="admin/main/statistics.tpl"}

{elseif $main eq "configuration"}
{include file="admin/main/configuration.tpl"}

{elseif $main eq "newsletter"}
{include file="admin/main/newsletter.tpl"}

{elseif $main eq "shipping"}
{include file="admin/main/shipping.tpl"}

{elseif $main eq "newsletter_modify"}
{include file="admin/main/newsletter_modify.tpl"}

{elseif $main eq "newsletter_modify_message"}
{include file="admin/main/newsletter_modify_message.tpl"}

{elseif $main eq "newsletter_add_message"}
{include file="admin/main/newsletter_add_message.tpl"}

{elseif $main eq "newsletter_send_message"}
{include file="admin/main/newsletter_send_message.tpl"}

{elseif $main eq "states_edit"}
{include file="admin/main/states.tpl"}

{elseif $main eq "users"}
{include file="single/main/users.tpl"}

{elseif $main eq "featured_products"}
{include file="admin/main/featured_products.tpl"}

{elseif $main eq "category_modify"}
{include file="admin/main/category_modify.tpl"}

{elseif $main eq "category_delete_confirmation"}
{include file="admin/main/category_del_confirmation.tpl"}

{elseif $main eq "category_delete_message"}
{include file="admin/main/category_delete_message.tpl"}

{elseif $main eq "user_delete_confirmation"}
{include file="admin/main/user_delete_confirmation.tpl"}

{elseif $main eq "user_delete_message"}
{include file="admin/main/user_delete_message.tpl"}

{elseif $main eq "user_add"}
{if $smarty.get.usertype eq "A"}
{assign var="last_location" value="Create administrator"}
{elseif $smarty.get.usertype eq "P"}
{assign var="last_location" value="Create provider"}
{else}
{assign var="last_location" value="Create customer"}
{/if}
{include file="main/register.tpl"}

{elseif $main eq "product"}
{include file="main/product.tpl" product=$product}

{elseif $main eq "discounts"}
{include file="provider/main/discounts.tpl"}

{elseif $main eq "coupons"}
{include file="modules/Discount_Coupons/coupons.tpl"}

{elseif $main eq "product_options"}
{if $active_modules.Product_Options ne ""}
{include file="modules/Product_Options/global_prodopts.tpl"}
{/if}

{elseif $main eq "extra_fields"}
{if $active_modules.Extra_Fields ne ""}
{include file="modules/Extra_Fields/extra_fields.tpl"}
{/if}

{elseif $main eq "states"}
{include file="provider/main/states.tpl"}

{elseif $main eq "giftcerts"}
{include file="modules/Gift_Certificates/gc_admin.tpl"}

{elseif $main eq "db_backup"}
{include file="admin/main/db_backup.tpl"}

{elseif $main eq "countries"}
{include file="provider/main/countries.tpl"}

{elseif $main eq "import"}
{include file="provider/main/import.tpl"}

{elseif $main eq "export"}
{include file="provider/main/export.tpl"}

{elseif $main eq "shipping_rates"}
{include file="provider/main/shipping_rates.tpl"}

{elseif $main eq "shipping_zones"}
{include file="provider/main/shipping_zones.tpl"}

{elseif $main eq "home" and $login ne ""}
{include file="admin/main/promotions.tpl"}
{include file="provider/main/promotions.tpl"}

{elseif $main eq "home"}
{include file="admin/main/welcome.tpl"}

{elseif $main eq "ratings_edit"}
{include file="admin/main/ratings_edit.tpl"}

{elseif $main eq "inv_update"}
{include file="provider/main/inv_update.tpl"}

{elseif $main eq "inv_updated"}
{include file="main/inv_updated.tpl"}

{elseif $main eq "error_inv_update"}
{include file="main/error_inv_update.tpl"}

{elseif $main eq "html_catalog"}
{include file="admin/main/html_catalog.tpl"}

{elseif $main eq "prodconf"}
{include file="modules/Product_Configurator/pc_admin.tpl"}

{elseif $main eq "prodconfsearch"}
{include file="modules/Product_Configurator/pcsearch_admin.tpl"}

{else}
{include file="common_templates.tpl"}
{/if}



</td>
<td width=20></td>
<td width=150 class=VertMenuBox valign=top>
{if $login eq "" }
{ include file="news.tpl" }
{else}
{ include file="authbox.tpl" }


{ include file="admin/menu_admin.tpl" }


{ include file="admin/menu_affiliate.tpl" }
{ include file="single/menu_profile.tpl" }
{/if}



</td>
</tr>
</table>
{ include file="rectangle_bottom.tpl" }
</body>
</html>


thanks again

rafael


All times are GMT -8. The time now is 07:55 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.