Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 08-09-2011, 04:21 AM   PM User | #1
rekgreen
New to the CF scene

 
Join Date: Aug 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
rekgreen is an unknown quantity at this point
Looking for help with js in BigCommerce Store

I have a BigCommerce Store. On the right-hand side of my store under My Favourites see (http://gatesunique.mybigcommerce.com/doodle-daddles/) if I click on add to cart:

In Chrome it comes back with a blank page with "Add to my designAdd to my designAdd to my designAdd to my design"

In Firefox it comes back with a blank page with "Add to my design"

In i.e. it works perfectly and takes me to the fast cart.

I have script which is supposed to change the label "compare" on the main products page to "add to my design" depending on which category was chosen. Here is the script. If I remove the script the cart works perfectly, but then of course I don't have the label changed as I want it. Please let me know if there is more information I can provide to get help with this.

[CODE]<script type="text/javascript">
var doodle= "http://gatesunique.mybigcommerce.com/doodle-daddles/";

if (location.href==doodle){
document.write('<label for="compare_%%GLOBAL_ProductId%%">Add to my design</label>');
} else {
document.write('<label for="compare_%%GLOBAL_ProductId%%">%%LNG_Compare%%</label>');
}

</script>[ICODE]
rekgreen is offline   Reply With Quote
Old 09-06-2012, 02:12 PM   PM User | #2
DynamicSystems
New Coder

 
Join Date: Sep 2012
Location: Dynamic Systems
Posts: 10
Thanks: 2
Thanked 1 Time in 1 Post
DynamicSystems is an unknown quantity at this point
The problem is with getting that vrble. You may use Jquery to get that variable, after which you can use it to output text via normal JS.
DynamicSystems is offline   Reply With Quote
Reply

Bookmarks

Tags
javascript

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:55 PM.


Advertisement
Log in to turn off these ads.