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

Mozilla (firefox) messing up my site

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 11-19-2007, 01:55 PM
 
keystone keystone is offline
 

X-Adept
  
Join Date: Jul 2006
Location: USA
Posts: 787
 

Default Mozilla (firefox) messing up my site

Hi,
My site looks fine in both ie and safari, but I had someone using firefox tell me today that they were getting code on the product details pages. I check and actually my home page is jacked up too. I was using <!-- BLAH BLAH --> to comment a piece of template used in the head.tpl (if you look right before the searh bar across the top you can see the opening "<!--" and actually that searh area is the part of code I commented out (look fine in ie and safari. Can anyone explain this to me? Also check out any product details page and let me know if you can see what is going on. IT SEEMS LIKE ONLY PRODUCTS WITH VARIANTS ARE HAVING THE PROBLEMS. You can see in my reed diffuser catagory, the first product "orange blossom 8oz diffuser" is fine but check the 4oz kits right below it and it's all code. Thanks for your help.
www.uscandleco.com
__________________
www.uscandleco.com - X-Cart Version 4.7.11 Gold Plus php7.3
mods:
reCaptcha
running on UNIX

www.keystonecandle.com X-Cart Gold Plus - Version 4.7.11 php7.2
mods:
reCaptcha
cdseo pro
running on UNIX
Reply With Quote
  #2  
Old 11-19-2007, 02:03 PM
 
balinor balinor is offline
 

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

Default Re: Mozilla (firefox) messing up my site

Firefox isn't messing up your site, you messed up your site Never use html comments, always use {* *} to comment out code in Smarty templates. Try replacing the html comments with Smarty comments and see if that helps.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 11-19-2007, 02:37 PM
 
keystone keystone is offline
 

X-Adept
  
Join Date: Jul 2006
Location: USA
Posts: 787
 

Default Re: Mozilla (firefox) messing up my site

That's what I meant but it is always more fun to blame someone else... I'll give that a shot and see what happens. I don't think that has anything to do with why my details pages are messed up though. Any thoughts on that? Ok, it looks like there is a --> at the end of all the code on my product details page so I must have commented something out there too. I'm not sure which template it was though. I noticed that in the /customer/main/product.tpl there are <!-- comment tags but I don't think that I put them there ie.
<!--
var min_avail = 1;
var avail = 1;
var product_avail = 1;
-->

Should I change these as well or are they correct?
__________________
www.uscandleco.com - X-Cart Version 4.7.11 Gold Plus php7.3
mods:
reCaptcha
running on UNIX

www.keystonecandle.com X-Cart Gold Plus - Version 4.7.11 php7.2
mods:
reCaptcha
cdseo pro
running on UNIX
Reply With Quote
  #4  
Old 11-19-2007, 02:58 PM
 
balinor balinor is offline
 

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

Default Re: Mozilla (firefox) messing up my site

You are right, your product page is SERIOUSLY messed up. I'd restore the original (make a backup of your current one first) and then slowly piece it back together.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #5  
Old 11-19-2007, 03:07 PM
 
inebriate inebriate is offline
 

eXpert
  
Join Date: May 2006
Posts: 301
 

Default Re: Mozilla (firefox) messing up my site

Quote:
Originally Posted by keystone
Ok, it looks like there is a --> at the end of all the code on my product details page so I must have commented something out there too. I'm not sure which template it was though. I noticed that in the /customer/main/product.tpl there are <!-- comment tags but I don't think that I put them there ie.
<!--
var min_avail = 1;
var avail = 1;
var product_avail = 1;
-->

Should I change these as well or are they correct?

those are correct, its part of javascript (legacy support)
__________________
x-cart pro 4.0.18
linux
www.fabric8d.com (currently undergoing construction)
Reply With Quote
  #6  
Old 11-19-2007, 03:46 PM
 
keystone keystone is offline
 

X-Adept
  
Join Date: Jul 2006
Location: USA
Posts: 787
 

Default Re: Mozilla (firefox) messing up my site

After looking closer at the code in my head.tpl file i think that my <!-- comment is screwing up both the home page and my product details pages. I'm not sure how ie and safari are reading it correctly either. I'll do some work and see if this sorts out everything. If I view the page source it looks like there are some include files between my opening and closing comments and some closing --> in those files are interfearing with my commenting, as well as some {if} {else} statements. I probably should select smaller sections of code ( or change to {* *} ) like balinor suggested.
__________________
www.uscandleco.com - X-Cart Version 4.7.11 Gold Plus php7.3
mods:
reCaptcha
running on UNIX

www.keystonecandle.com X-Cart Gold Plus - Version 4.7.11 php7.2
mods:
reCaptcha
cdseo pro
running on UNIX
Reply With Quote
  #7  
Old 11-19-2007, 03:57 PM
 
keystone keystone is offline
 

X-Adept
  
Join Date: Jul 2006
Location: USA
Posts: 787
 

Default Re: Mozilla (firefox) messing up my site

Yep, as soon as I removed my comments, everything is good. What I am trying to do is remove the search bar from across the top of the page. I have placed a copy of it at the top of the right nav column. Is there an easy way to comment out that bit of code in the head.tpl file? There is a lot of {if} {else} code refering to fast lane checkout which I'm using so I wanted to comment it out instead of delete it. Which part of this do I comment out to just get rid of the search bar?

{* $Id: head.tpl,v 1.58 2006/03/17 08:50:44 svowl Exp $ *}
{* Start New Tab Display *}

{if $usertype eq "C"}
{include file="customer/top_menu.tpl"}
{/if}

{* End New Tab Display *}

<table cellpadding="0" cellspacing="0" width="100%">
<tr>
<td class="HeadLogo"><a href="/"><img src="{$ImagesDir}/header-logo-new2.gif" alt="u.s. candle company name" /></a></td>
</tr>
</table>
<br />
<table cellpadding="0" cellspacing="0" width="100%">
<tr>
<td colspan="2" class="HeadThinLine"><img src="{$ImagesDir}/spacer.gif" class="Spc" alt="" /></td>
</tr>
{if $main ne "fast_lane_checkout"}
<tr>
<td class="HeadLine" height="22">
{if $usertype eq "C"}
{ include file="customer/search.tpl" }
{/if}
</td>
<td class="HeadLine" align="right">
{if ($usertype eq "C" || $usertype eq "B") && $all_languages_cnt gt 1}
<form action="home.php" method="get" name="sl_form">
<input type="hidden" name="redirect" value="{$smarty.server.PHP_SELF}?{$smarty.server.Q UERY_STRING|amp}" />
<table cellpadding="0" cellspacing="0">
<tr>
<td style="padding-right: 5px;"><b>{$lng.lbl_select_language}:</b></td>
<td><select name="sl" onchange="javascript: this.form.submit();">
{section name=ai loop=$all_languages}
<option value="{$all_languages[ai].code}"{if $store_language eq $all_languages[ai].code} selected="selected"{/if}>{$all_languages[ai].language}</option>
{/section}
</select></td>
</tr>
</table>
</form>
{else}
&nbsp;
{/if}
</td>
</tr>
{else}
{* Fast Lane Checkout page *}
<tr>
<td colspan="2" class="HeadLine">
<form action="{$xcart_web_dir}/include/login.php" method="post" name="toploginform">
<input type="hidden" name="mode" value="logout" />
<input type="hidden" name="redirect" value="{$redirect}" />
<table cellpadding="0" cellspacing="0" width="100%">
<tr>
<td class="FLCAuthPreBox">
{if $active_modules.SnS_connector and $sns_collector_path_url ne '' && $config.SnS_connector.sns_display_button eq 'Y'}
<img src="{$ImagesDir}/rarrow.gif" alt="" valign="middle" /><b>{include file="modules/SnS_connector/button.tpl" text_link="Y"}</b>
{else}
<img src="{$ImagesDir}/spacer.gif" class="Spc" alt="" />
{/if}
</td>
{if $login ne ""}
<td align="right" nowrap="nowrap"><b>{$userinfo.firstname} {$userinfo.lastname}</b> {$lng.txt_logged_in}</td>
<td class="FLCAuthBox">
{if $js_enabled}
{include file="buttons/button.tpl" button_title=$lng.lbl_logoff href="javascript: document.toploginform.submit();" js_to_href="Y"}
{else}
{include file="buttons/logout_menu.tpl"}
{/if}
</td>
{/if}
</tr>
</table>
</form>
</td>
</tr>
{/if}
<tr>
<td colspan="2" class="HeadThinLine"><img src="{$ImagesDir}/spacer.gif" class="Spc" alt="" /></td>
</tr>
{******** Remove this line to display how much products there are online ****
<tr>
{insert name="productsonline" assign="_productsonline"}
<td colspan="2" class="NumberOfArticles" align="right">
{if $config.Appearance.show_in_stock eq "Y"}
{insert name="itemsonline" assign="_itemsonline"}
{$lng.lbl_products_and_items_online|substitute:"X" :$_productsonline:"Y":$_itemsonline}
{else}
{$lng.lbl_products_online|substitute:"X":$_product sonline}
{/if}
&nbsp;
</td>
</tr>
**** Remove this line to display how much products there are online ********}
{if $main ne "fast_lane_checkout"}
<tr>
<td colspan="2" valign="middle" height="32">
<table cellspacing="0" cellpadding="0" width="100%">
<tr>
<td class="HeadTopPad"><img src="{$ImagesDir}/spacer.gif" alt="" /></td>
{if (($main eq 'catalog' && $cat ne '') || $main eq 'product' || ($main eq 'comparison' && $mode eq 'compare_table') || ($main eq 'choosing' && $smarty.get.mode eq 'choose')) && $config.Appearance.enabled_printable_version eq 'Y'}
<td class="PrintableRow" align="right">{include file="printable.tpl"}</td>
{/if}
</tr>
</table>
</td>
</tr>
{else}
{* Fast Lane Checkout page *}
<tr>
<td colspan="2" class="FLCTopPad"><img src="{$ImagesDir}/spacer.gif" alt="" /></td>
</tr>
{/if}
</table>

thanks
__________________
www.uscandleco.com - X-Cart Version 4.7.11 Gold Plus php7.3
mods:
reCaptcha
running on UNIX

www.keystonecandle.com X-Cart Gold Plus - Version 4.7.11 php7.2
mods:
reCaptcha
cdseo pro
running on UNIX
Reply With Quote
  #8  
Old 11-19-2007, 04:32 PM
 
keystone keystone is offline
 

X-Adept
  
Join Date: Jul 2006
Location: USA
Posts: 787
 

Default Re: Mozilla (firefox) messing up my site

never mind, i got it figured out. Thanks for your help though.
__________________
www.uscandleco.com - X-Cart Version 4.7.11 Gold Plus php7.3
mods:
reCaptcha
running on UNIX

www.keystonecandle.com X-Cart Gold Plus - Version 4.7.11 php7.2
mods:
reCaptcha
cdseo pro
running on UNIX
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 04:59 AM.

   

 
X-Cart forums © 2001-2020