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

Page Width Changes Using Product Variants Firefox to IE

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 02-11-2007, 12:48 PM
 
Harry Nile Harry Nile is offline
 

Member
  
Join Date: Nov 2006
Posts: 24
 

Default Page Width Changes Using Product Variants Firefox to IE

I noticed that the page width expands about 30 pixels in Firefox 1.5.0.9 on the products.php page when a product with variants is dispayed. This page width expansion does not occur in IE 7.

You can see this difference on the following pages using Firefox:

The link below is a product without variants:
http://jimfrenchproductions.com/xcart413/product.php?productid=42&cat=2&page=1

The link below is a product with variants. You will see the option to select either CD or MP3:
http://jimfrenchproductions.com/xcart413/product.php?productid=16&cat=2&page=1

The wider page width for the product with variants pushes the page into a column on the right that is set up as an absolutely positioned DIV. Also when the lower cost variant is selected (choose MP3 from the options) the discount graphic widens the page even further pushing the right column deeply into the absolutely positioned column.

I see the variants code is written in javascript. Is there any way to fix this?

Also is there a way to turn off the display of the discount "save_percent_box" box cell? While this is a nice feature, it doesn't fit well in my design with the absolutely positioned column.

Thank you for your support,

Harry
__________________
X Cart 4.1.6
X Survey
X Affiliates
Altered Cart-Product Page Download Manager
Altered Cart-Download Expander
Reply With Quote
  #2  
Old 02-11-2007, 01:58 PM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default Re: Page Width Changes Using Product Variants Firefox to IE

Harry,

The reason the page expands is because of the "discount save_percent_box"

To kill it, in product.tpl, FIND:

Code:
<span id="save_percent_box">{if $product.taxed_price >= $product.list_price}{/if} {if $product.taxed_price gt 0 and $product.list_price gt 0} <table align="center" width="60"><tr><td class="SaveMoneyLabel"> {math equation="100-(price/lprice)*100" price=$product.taxed_price lprice=$product.list_price format="%3.0f" assign=discount} &nbsp;<span id="save_percent">{ $discount } </span>% </td> </tr> </table> </span>{/if}
Comment out most of this. I think you can comment all of it out. You may have a table formating issue... but maybe not if it's all commented out. product.tpl is a mess of nested tables. But this is definitely the code that's displaying the discount banner, and if removed, it will fix your issue.

Hope this helps.

Jeremy
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
  #3  
Old 02-11-2007, 04:35 PM
 
balinor balinor is offline
 

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

Default Re: Page Width Changes Using Product Variants Firefox to IE

Moving to Template Editing as this is not a bug. Please be sure to read the guidelines on posting in the bugs forum, thanks
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #4  
Old 02-11-2007, 07:53 PM
 
Harry Nile Harry Nile is offline
 

Member
  
Join Date: Nov 2006
Posts: 24
 

Default Re: Page Width Changes Using Product Variants Firefox to IE

Thank you for the help.

I was mistaken.. The widening problem is caused by the way Firefox interprets the "Audio Download Instructions" DIV. I should have checked it before I posted. I was able to fix the issue by editing the CSS for the DIV.

Thank you for pointing me to the "save_percent_box" code block. I see it has changed a bit from 4.1.5 to 4.1.6 (assuming you pulled the code from 4.1.6).

In 4.1.5 the "save_percent_box" is a TD id instead of a SPAN.

Code:
</td> <td align="right" valign="top" width="60" id="save_percent_box"{if $product.taxed_price >= $product.list_price} style="display: none;"{/if}> {if $product.taxed_price gt 0 and $product.list_price gt 0} <table width="60" cellspacing="1" cellpadding="2"> <tr> <td class="SaveMoneyLabel"> <br /> {math equation="100-(price/lprice)*100" price=$product.taxed_price lprice=$product.list_price format="%3.0f" assign=discount} &nbsp;<span id="save_percent">{ $discount }</span>% </td> </tr> </table> {/if} </td>

I was wondering if there was a setting in the administration area to turn this on and off but apparently not.

I may just wrap the entire HTML in another 2 column table and put the CafePress table inside the right column so it can move with the page flow and let the "save_percent_box" display. It is a nice feature. First I will see if I can CSS a float.


Thank you for your support,

Harry
__________________
X Cart 4.1.6
X Survey
X Affiliates
Altered Cart-Product Page Download Manager
Altered Cart-Download Expander
Reply With Quote
  #5  
Old 02-11-2007, 08:05 PM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default Re: Page Width Changes Using Product Variants Firefox to IE

Whoops... I may have edited this code at some point - which could explain some differences...

here is the virgin 4.1.6 block
Code:
<table width="60" cellspacing="1" cellpadding="2"> <tr> <td class="SaveMoneyLabel"> <br /> {math equation="100-(price/lprice)*100" price=$product.taxed_price lprice=$product.list_price format="%3.0f" assign=discount} &nbsp;<span id="save_percent">{ $discount }</span>% </td> </tr> </table>
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
  #6  
Old 02-12-2007, 01:23 AM
 
Harry Nile Harry Nile is offline
 

Member
  
Join Date: Nov 2006
Posts: 24
 

Default Re: Page Width Changes Using Product Variants Firefox to IE

I found the best solution for me was to create another table column cell in the "Container" table, found in rectangle_bottom.tpl, and put the CafePress table in there.

Now it will expand and contract nicely with the "save_percent_box" and/or any other things that might stretch the page width.

I may get the hang of this if I keep trying

Thank you for your support,

Harry
__________________
X Cart 4.1.6
X Survey
X Affiliates
Altered Cart-Product Page Download Manager
Altered Cart-Download Expander
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 02:53 PM.

   

 
X-Cart forums © 2001-2020