The information in this thread might be outdated
If the solution did not help, please, check our Help Portal or contact Ecwid Team.
 
 
Thread Tools Display Modes
  #1  
Old 09-05-2013, 03:24 PM
sg2designs's Avatar
sg2designs is offline
Junior Member
 
Join Date: Sep 2013
Posts: 8
Default

Universally Changing "Bag" to "Cart"


The cart I'm working on is almost there, as far as the customizing we need. But I'm still stumped on a couple things.

I wanted to change the button text in the first/main product screen to say "Add to Cart" instead of "Add to Bag". I got that to work with:

<script type="text/javascript">
ecwidMessages = {
"BuyNow.buy_now":"Add to Cart"
}
</script>

(Oddly enough, it works by the code being below the main script code, rather than above it... so I'm not going to "fix something that isn't broken".)

However, when you click on any product to go to its page, it still says "Add to Bag". In addition, the text on the floating cart widget itself says "Shopping Bag" and "Open Bag".

I went to the translate tool and found a few options. I have this above the main script, but it doesn't appear to change anything:

<script type="text/javascript">
ecwidMessages = {
"BreadCrumbs.your_bag":"Your shopping cart",
"EmptyShoppingCartPanel.empty":"Your Shopping Cart is empty",
"ProductBrowser.your_cart":"Your Cart",
"TableProductsContainer.add_to_bag":"Add to Cart"
};
</script>

Bottom line is, I'm trying to replace the word "Bag" with "Cart" everywhere.

So, what do I need to add or take out of this code to change that? Thanks in advance. We really want this to work, as this cart solution is exactly what we've been looking for.
  #2  
Old 09-06-2013, 11:49 AM
Liza P's Avatar
Liza P Liza P is offline
Ecwid Team
 
Join Date: Jan 2013
Posts: 2,517
Default

Quote:
Originally Posted by Gregs Graphics View Post
The cart I'm working on is almost there, as far as the customizing we need. But I'm still stumped on a couple things.

I wanted to change the button text in the first/main product screen to say "Add to Cart" instead of "Add to Bag". I got that to work with:

<script type="text/javascript">
ecwidMessages = {
"BuyNow.buy_now":"Add to Cart"
}
</script>

(Oddly enough, it works by the code being below the main script code, rather than above it... so I'm not going to "fix something that isn't broken".)

However, when you click on any product to go to its page, it still says "Add to Bag". In addition, the text on the floating cart widget itself says "Shopping Bag" and "Open Bag".

I went to the translate tool and found a few options. I have this above the main script, but it doesn't appear to change anything:

<script type="text/javascript">
ecwidMessages = {
"BreadCrumbs.your_bag":"Your shopping cart",
"EmptyShoppingCartPanel.empty":"Your Shopping Cart is empty",
"ProductBrowser.your_cart":"Your Cart",
"TableProductsContainer.add_to_bag":"Add to Cart"
};
</script>

Bottom line is, I'm trying to replace the word "Bag" with "Cart" everywhere.

So, what do I need to add or take out of this code to change that? Thanks in advance. We really want this to work, as this cart solution is exactly what we've been looking for.
Hello,

For all the labels to be translated, you need to combine all the translation codes that you used. Here is the code you should add to your site to translate the labels you listed in your message above:

Code:
<script type="text/javascript">
ecwidMessages = {
"BuyNow.buy_now":"Add to Cart",
"BreadCrumbs.your_bag":"Your shopping cart",
"EmptyShoppingCartPanel.empty":"Your Shopping Cart is empty",
"ProductBrowser.your_cart":"Your Cart",
"TableProductsContainer.add_to_bag":"Add to Cart"
};
</script>
In case you want to change some other labels you should add them to this existing code, each line must be ended with comma except the last line. Please, refer to this article for details: http://kb.ecwid.com/w/page/22978888/...Scriptcodework

Here you can find the list of all storefront labels available for translation: http://kb.ecwid.com/w/file/64115464/...s_13_1_eng.txt

Also, please, refer to this article for instructions on translating/changing "Add to bag" button: http://kb.ecwid.com/w/page/21499933/...ag%22%20button
__________________
Liza P.
Customer Care
Ecwid Help Portal
  #3  
Old 06-06-2014, 08:35 PM
Donna Woods's Avatar
Donna Woods Donna Woods is offline
 
Join Date: Jun 2014
Posts: 1
Default

Can't you just make this an option instead of all this coding?
  #4  
Old 06-12-2014, 10:20 AM
Liza P's Avatar
Liza P Liza P is offline
Ecwid Team
 
Join Date: Jan 2013
Posts: 2,517
Default

Quote:
Originally Posted by Donna Woods View Post
Can't you just make this an option instead of all this coding?
Hello,

At the moment the available option to change the labels in the storefront is by adding a translation JavaScript to the source code of the site page, where Ecwid store is added. However, as long as you are using the Wix app, you don't have access to the source code, so you can't add anything to it, unfortunately.

The good news is the ability to change the labels in Ecwid stores created via Wix app market will appear in Ecwid soon, we are currently working on it. We have created a forum thread where we post all Ecwid feature updates, please, subscribe to it to stay tuned: http://www.ecwid.com/forums/showthread.php?t=27402
__________________
Liza P.
Customer Care
Ecwid Help Portal
  #5  
Old 10-28-2014, 06:40 PM
Good Superfoods LLC's Avatar
Good Superfoods LLC Good Superfoods LLC is offline
 
Join Date: Oct 2014
Posts: 11
Default

Hello Liza,

I'm popping in on this thread because I'm trying to do the same thing that the OP requested. I've closely followed the directions you posted above, and have added ALL the elements that contain the word "bag" in the code, and changed them to "cart", just as you described. However, it's not working for me. I'm wondering if I've done something wrong.

In my case, I'm using single product embed code. Adobe Muse is my website builder. I have to drop code into each product page. I'm assuming that I will have to add this code to each and every product?

Would you mind looking at my code? Please let me know if you can see why it's not working.
Here is the product code, with all the lines of code to change "bag" to "cart":

Code:
<div class="ecwid ecwid-SingleProduct ecwid-Product ecwid-Product-39534777" itemscope itemtype="http://schema.org/Product" data-single-product-id="39534777"><div itemprop="addtobag"></div></div>
<script type="text/javascript">
ecwidMessages = {
“AddToBagWidget.product_added” : “The product was added to your shopping bag”,
“BreadCrumbs.your_bag” : “Your shopping bag”,
“Checkout.items_removed” : “Some items have been deleted from your bag as they are out of stock. Please check your bag before continuing the order.”,
“Checkout.items_unavailable” : “All items have been deleted from your bag as they are out of stock”,
“CheckoutServiceImpl.add_items” : “Please add some more items to your Cart.”,
“CheckoutServiceImpl.remove_items” : “Please remove items from your Cart.”,
“DnDLabel.drag_me” : “Drag & Drop Me to the Cart”,
“EmptyShoppingCartPanel.empty” : “Your Cart is empty”,
“Minicart.open_bag” : “Open Cart”,
“Minicart.out_of_stock” : “The product is out of stock and cannot be put in the Cart”,
“Minicart.shopping_bag” : “Cart”,
“PaypalCheckout.needs_storage” : “Unfortunately you cannot use PayPal Express Checkout, because storing site data (cookies and DOM storage) is disabled in your browser.<br/>\
Please enable either of them or select another payment method. \
Note that you should reload this page and re-add products to the Cart after enabling cookies or DOM storage.”,
“ProductBrowser.your_cart” : “Your Cart”,
“ProductDetails.all_items_in_bag” : “All items are in the Cart”,
“ProductDetails.in_bag” : “in the Cart”,
“ProductDetails.In_bag” : “In the Cart”,
“ShoppingCart.open_bag” : “Please open the Cart and remove some products or go to checkout.”,
“ShoppingCart.the_number_of_products” : “The number of different products in your Cart”,
“ShoppingCartView.applied_to_some” : “applied to some products in the Cart”,
“ShoppingCartView.clear” : “Clear Cart”,
“ShoppingCartView.needs_storage” : “Storing site data (cookies and DOM storage) is disabled in your browser. Please enable either of them, otherwise you may face issues on checkout. After enabling storing site data, please reload the page and add products to the Cart again.”,
“ShoppingCartView.shopping_bag” : “Your Cart”,
“TableProductsContainer.add_to_bag” : “Add to Cart”
};
</script>
<script type="text/javascript" src="http://app.ecwid.com/script.js?5323205" charset="utf-8"></script><script type="text/javascript">xSingleProduct()</script>
Bumping this up… Can anyone look at my code above and let me know if they can see why it isn't working?

Last edited by Liza; 10-29-2014 at 12:38 PM.
  #6  
Old 10-28-2014, 06:48 PM
Good Superfoods LLC's Avatar
Good Superfoods LLC Good Superfoods LLC is offline
 
Join Date: Oct 2014
Posts: 11
Default Can we use 2 different custom "Add To Bag" images? (Desktop/Mobile versions)

Hello,

I have successfully changed my "Add to Bag" button with a custom hosted "Buy Now" image following the instructions in the Ecwid Knowledge Base. The problem is that as this is now changed in my Custom CSS Theme, and the same "Buy Now" image is used in my Mobile site (I use Adobe Muse, and have built a dedicated mobile site). I need a significantly smaller button for the mobile site.

Can a 2nd button styling be added?

Thanks!

BTW, let me know if you need a site link, it is in construction and not hosted at the moment, but I can publish something.
  #7  
Old 10-29-2014, 01:50 PM
Liza P's Avatar
Liza P Liza P is offline
Ecwid Team
 
Join Date: Jan 2013
Posts: 2,517
Default

Quote:
Originally Posted by undermind View Post
Hello,

I have successfully changed my "Add to Bag" button with a custom hosted "Buy Now" image following the instructions in the Ecwid Knowledge Base. The problem is that as this is now changed in my Custom CSS Theme, and the same "Buy Now" image is used in my Mobile site (I use Adobe Muse, and have built a dedicated mobile site). I need a significantly smaller button for the mobile site.

Can a 2nd button styling be added?

Thanks!

BTW, let me know if you need a site link, it is in construction and not hosted at the moment, but I can publish something.
Hello,

Please, post here your storefront URL. The link to the mobile site will also help.

Thank you in advance.
__________________
Liza P.
Customer Care
Ecwid Help Portal
  #8  
Old 10-29-2014, 04:56 PM
Good Superfoods LLC's Avatar
Good Superfoods LLC Good Superfoods LLC is offline
 
Join Date: Oct 2014
Posts: 11
Default

Quote:
Originally Posted by Liza View Post
Hello,

Please, post here your storefront URL. The link to the mobile site will also help.

Thank you in advance.
Hi Liza,

Did you move my thread about 2 different Add to Bag buttons into this thread? I am curious about that, but it is very urgent that I resolve the issue of changing all instances of "bag" to "cart". That singular issue is holding up the launch of my client's site. Can you please help me with that issue?

The website is currently hosted on my test domain :
http://www.ververmediatestsite.com
The mobile site will come up automatically on a mobile device ( www.ververmediatestsite.com/phone/index.html )

Thanks

Last edited by undermind; 10-29-2014 at 07:53 PM.
  #9  
Old 10-31-2014, 02:18 PM
Liza P's Avatar
Liza P Liza P is offline
Ecwid Team
 
Join Date: Jan 2013
Posts: 2,517
Default

Quote:
Originally Posted by Good Superfoods LLC View Post
Hi Liza,

Did you move my thread about 2 different Add to Bag buttons into this thread? I am curious about that, but it is very urgent that I resolve the issue of changing all instances of "bag" to "cart". That singular issue is holding up the launch of my client's site. Can you please help me with that issue?

The website is currently hosted on my test domain :
http://www.ververmediatestsite.com
The mobile site will come up automatically on a mobile device ( www.ververmediatestsite.com/phone/index.html )

Thanks
Hello,

Thank you for the provided links.

I have checked the source code of your site. The reason why the translate code is not working in the quotes you are using in it. It looks like before adding the translation code to the site you edited it in some third party text editor which changed the quotes and made them invalid.

The quotes you are using are like this ”” : ””, while the should be like this "" : "", those are actually different symbols.

In order to fix the issue you need to change the quotes in the translation code on your site. But I already did this for you. Here is the code you should use:

Code:
<script type="text/javascript">
ecwidMessages = {
"AddToBagWidget.product_added" : "The product was added to your shopping bag",
"BreadCrumbs.your_bag" : "Your shopping bag",
"Checkout.items_removed" : "Some items have been deleted from your bag as they are out of stock. Please check your bag before continuing the order.",
"Checkout.items_unavailable" : "All items have been deleted from your bag as they are out of stock",
"CheckoutServiceImpl.add_items" : "Please add some more items to your Cart.",
"CheckoutServiceImpl.remove_items" : "Please remove items from your Cart.",
"DnDLabel.drag_me" : "Drag & Drop Me to the Cart",
"EmptyShoppingCartPanel.empty" : "Your Cart is empty",
"Minicart.open_bag" : "Open Cart",
"Minicart.out_of_stock" : "The product is out of stock and cannot be put in the Cart",
"Minicart.shopping_bag" : "Cart",
"PaypalCheckout.needs_storage" : "Unfortunately you cannot use PayPal Express Checkout, because storing site data (cookies and DOM storage) is disabled in your browser.<br/>\
Please enable either of them or select another payment method. \
Note that you should reload this page and re-add products to the Cart after enabling cookies or DOM storage.",
"ProductBrowser.your_cart" : "Your Cart",
"ProductDetails.all_items_in_bag" : "All items are in the Cart",
"ProductDetails.in_bag" : "in the Cart",
"ProductDetails.In_bag" : "In the Cart",
"ShoppingCart.open_bag" : "Please open the Cart and remove some products or go to checkout.",
"ShoppingCart.the_number_of_products" : "The number of different products in your Cart",
"ShoppingCartView.applied_to_some" : "applied to some products in the Cart",
"ShoppingCartView.clear" : "Clear Cart",
"ShoppingCartView.needs_storage" : "Storing site data (cookies and DOM storage) is disabled in your browser. Please enable either of them, otherwise you may face issues on checkout. After enabling storing site data, please reload the page and add products to the Cart again.",
"ShoppingCartView.shopping_bag" : "Your Cart",
"TableProductsContainer.add_to_bag" : "Add to Cart"
};
</script>
Please, remove the old code from your site and add this one instead. Please, place this code before Ecwid integration code on all the pages where you added Ecwid. Please, mind that each page can contain only one translation code.
__________________
Liza P.
Customer Care
Ecwid Help Portal
The Following User Says Thank You to Liza P For This Useful Post:
Good Superfoods LLC (11-01-2014)
  #10  
Old 11-01-2014, 07:42 PM
Good Superfoods LLC's Avatar
Good Superfoods LLC Good Superfoods LLC is offline
 
Join Date: Oct 2014
Posts: 11
Default

Thanks Liza, and good catch! I don't even know HOW to make those custom quotes, so I'm not sure how they got there. : /
 
The information in this thread might be outdated
If the solution did not help, please, check our Help Portal or contact Ecwid Team.

Tags
add to cart, cart buttons

Thread Tools
Display Modes

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. The time now is 04:08 AM.
Powered by vBulletin® Version 3.8.11. Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.