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)
-   -   Currency symbol mysteriously moving - and I can see it happening?! (https://forum.x-cart.com/showthread.php?t=46817)

tqualizerman 04-07-2009 11:56 AM

Currency symbol mysteriously moving - and I can see it happening?!
 
Hi everyone,

Something weird is happening on my product pages. When I load this page: http://www.nerdseven.com/suckUK/mycuppa_perfect_coffee_mug/ for instance (or any page with product variants) the currency symbol ($) starts in correct place (left of the dollar amount) and then magically pops over to the right hand side of the currency value - and I can see this happen.

When looking at the source of my page It shows the currency symbol in the correct place, so I can't imagine what is causing this.

Can anyone take a look at this? Its an awful flaw to have on my site for customers to see. :\

photo 04-07-2009 12:02 PM

Re: Currency symbol mysteriously moving - and I can see it happening?!
 
Just checked it and your right, it does jump over! Have you tried removing the "each" once and seeing if it still does it?

tqualizerman 04-07-2009 12:14 PM

Re: Currency symbol mysteriously moving - and I can see it happening?!
 
I just tried that and it doesn't change the mysterious moving monetary symbol. Would this have anything to do with a misplaced ID tag???

tqualizerman 04-07-2009 01:59 PM

Re: Currency symbol mysteriously moving - and I can see it happening?!
 
Further investigation ... figured out that the "id="product_price" tag (which is required to update products with price variants) is somehow involved in this problem.

Can anyone help me figure this out?

gb2world 04-07-2009 02:39 PM

Re: Currency symbol mysteriously moving - and I can see it happening?!
 
The javascript in func.js is what does the substitution of the price - you can check any mod updates to skin1/modules/Product_Options/func.js. If you disable javascript on your site, you can see that the price tag correctly located - so you know there is something amiss in the check_options function.



A few more hints for when you look around func.js:

There is a javascript variable called currency_symbol that gets set based on the smarty code for the symbol. You will also see javascript code equating things to document.getElementById('product_price').innerHTML

That is where the javascript substitutes text inside the class called product_price depending on what option you select.

See how any mod that you added might be using the currency_symbol variable in the innerHTML - maybe if you debug with this in mind - it will point you to the issue. (Hopefully!)


All times are GMT -8. The time now is 08:56 AM.

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