Digital experiences for all disciplines
New Landing › How can we help? › Themeforest Theme Support › Neighborhood › mo-files and Add to cart-buttons
New Landing › How can we help? › Themeforest Theme Support › Neighborhood › mo-files and Add to cart-buttons
- This topic has 17 replies, 3 voices, and was last updated 9 years by Rui Guerreiro – SUPPORT.
-
Posted in: Neighborhood
-
February 6, 2015 at 9:39 am #147758
Hi Swift,
I have two questions:
1. I have made a few changes to some mo-files (translated into Danish) via the plugin Codestyling Localization. These changes are being reset/overridden back into English every time there’s a new Neighborhood update. How do avoid this? I have already installed and activated a child theme.
2. The ‘Add to cart’ (“Tilføj til kurv” in Danish) button on variable products looks weird after updating. How do I fix this? It can be seen here: http://skateshop.dk/produkt/almost-skateboards-8-0-impact-plus-avant-daewon/
Cheers
Jesper BilleskovFebruary 6, 2015 at 9:49 am #147762Hey Jesper.
Using the same theme for our Danish shop 🙂
Is your back-end language set to English or Danish? I had an issue close to this, but found, that if I change the back-end language to Danish, WooCommerce will change the “Add to basket” into “Læg i kurv” – permanently.
After the update I had the exact same problem and was given this solution:
.add_to_cart_button{ background: none repeat scroll 0 0 #222 !important; border: 0 solid #2e2e36 !important; border-radius: 0 !important; color: #ffffff; height: 40px; } .add_to_cart_button span:hover{ color:#fff !important; font-weight:bold !important; } .add_to_cart_button:hover{ background: none repeat scroll 0 0 #07C1B6 !important ; font-weight:bold !important; }
February 6, 2015 at 10:11 am #147767Hi Nikolaj,
Thanks for your input! 🙂
I am using WordPress and WooCommerce in Danish but Neighborhood in English so my back-end is somehow a combination of English and Danish.
The snippet you provided worked on product level. After a closer look, however, it messes with the “normal” products (products that are not variable) on mouse-overs on category level as you can see in my attachment 🙁
Cheers
Jesper BilleskovAttachments:
You must be logged in to view attached files.February 6, 2015 at 10:15 am #147772Hey Jesper.
We’re in test mode at the moment and I have only added a single product that is variable. I’ll go ahead and add another product that doesn’t have variables, I might be in need of the solution that will be provided here after all! 🙁
I am using WPML for my translations, so I don’t know about your plug-in and to be fair, I am quite sure I haven’t had the theme update with my translation, so I am not even sure that it won’t overwrite my translation also.
I’ll see what the supporters write here and add this to my page as well!
Sorry I couldn’t be of more help!
February 6, 2015 at 10:29 am #147777Just tested and I am getting the same problems on non variant products. So I am in need of a solution for this problem as well!
Attachments:
You must be logged in to view attached files.February 6, 2015 at 10:56 am #147789A small update (sorry do not mean to hijack your post, Jesper).
It seems to be a problem that the class for the add to cart button is the same for both product list and product item page because the font-weight on the product page is bold, and on the product list is normal. It’s not a problem with “Chose variant” because it’s a different class and is only used on the product list page, if that makes sense.
If you add font-weight bold, the product list will change from normal to bold on hover, which looks bad. If you leave it out, the product list looks good, but then “Add to cart” on the product page will go from bold to normal, which also looks bad 🙁
The add to cart buttons seems to be different from variant pages and no-variant pages, as it also has a +
February 6, 2015 at 11:09 am #147798Ok, I did some testing around. Seems like single variant uses a different add to cart class. I changed it around so all add to cart and select variant buttons are using font-weight:normal;
This code worked for me, Jesper, perhaps for you too?
.add_to_cart_button{ background: none repeat scroll 0 0 #222 !important; border: 0 solid #2e2e36 !important; border-radius: 0 !important; color: #ffffff; height: 40px; font-weight:normal !important; } .add_to_cart_button span:hover{ color:#07C1B6 !important; font-weight:normal !important; } .add_to_cart_button:hover{ background: none repeat scroll 0 0 #07c1b6; font-weight:normal !important; color:#07c1b6 !important; } .woocommerce form.cart button.single_add_to_cart_button { font-weight:normal !important; }
February 6, 2015 at 11:09 am #147799Hi,
Add the code below to your child theme functions.php
Also you will need to create a “languages” folder inside your child theme and paste the .po and .mo files there.
/** * Setup My Child Theme's textdomain. * * Declare textdomain for this child theme. * Translations can be filed in the /languages/ directory. */ function my_child_theme_setup() { load_child_theme_textdomain( 'swiftframework', get_stylesheet_directory() . '/languages' ); } add_action( 'after_setup_theme', 'my_child_theme_setup' );
-Rui
February 6, 2015 at 12:07 pm #147825Unfortunately, it still doesn’t work for me, Nikolaj 🙁
Thanks Rui, I will have a look at the language stuff.
February 6, 2015 at 12:27 pm #147833ok. give it a try.
-RuiFebruary 6, 2015 at 5:48 pm #147923Do you know how to fix the issues with the ‘Add to cart’ button, Rui?
February 9, 2015 at 11:19 am #148324Hi,
Here it goes, we have fixed this for the next update. The css fix is as follows:
.woocommerce form.cart button.add_to_cart_button { border: 0; border-radius: 0; box-shadow: none; height: 40px; padding: 0 15px; float: left; font-weight: bold!important; outline: 0!important; }
-Rui
February 12, 2015 at 8:53 am #149288Hi Rui,
It doesn’t seem to work. Do you have any other recommendations?
February 12, 2015 at 10:35 am #149341Hi,
It have to work because it worked for the other similar situations.
This is what I’m seeing
https://www.dropbox.com/s/6ru8ar074wydtfk/add_to_cart_page.png?dl=0Try to clear the browser cache.
If it still wrong can you show me in a screenshot, maybe it’s something different.
-Rui
February 12, 2015 at 10:50 am #149358Hi Rui,
Thanks for your reply.
You’re not looking at a ‘variable product’. Have a look at the button on this variable product: http://skateshop.dk/produkt/almost-skateboards-8-0-impact-plus-avant-daewon/
-
Posted in: Neighborhood
You must be logged in and have valid license to reply to this topic.