I'm having trouble adding a new type of ribbon in my child theme. On my advance/utilities/woocommerce.php I've added this:
if(!function_exists('a13_is_product_colored')){
function a13_is_product_colored() {
global $product;
return is_object_in_term( $product->id, 'product_tag', 'colores' );
}
}
Right below the "a13_is_product_new" function So far, the child theme works, but when I try to change this:
if(!$product->is_in_stock()){
echo '<span class="ribbon out-of-stock"><em>'.__( 'Out of stock', 'woocommerce' ).'</em></span>';
}
else{
//sale
if($product->is_on_sale()){
echo '<span class="ribbon sale"><em>'.__( 'Sale!', 'woocommerce' ).'</em></span>';
}
//new
if(a13_is_product_new()){
echo '<span class="ribbon new"><em>'.__fe('New!').'</em></span>';
}
if(a13_is_product_colored()){
echo '<span class="ribbon colores"><em>'.__fe('Más Colores!').'</em></span>';
}
}
On the woocommerce/content-product.php file, the theme stops loading any page.
You can check it on my site: www.pimuh.com
Thanks in advance
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
Please activated debug mode to see what PHP error occured.
http://codex.wordpress.org/Debugging_in_WordPress#WP_DEBUG
Then we can talk :-)
PS. Nice going :-)
With regards.
With regards.
Great! it worked! Many thanks!
On the other side, when i try to change the advance/utilities/woocommcerce file, in this line
<p class="buttons empty"><a class="a13-button" href="<?php echo get_permalink( wc_get_page_id( 'shop' ) ); ?>"><?php _fe( 'Go to the shop' ) ?></a></p>
I can't find a way to translate "go to the shop". I've edited the po fil, I've changed both fame and fame_child files, and it still shows "go to the shop" on my page
It was this topic http://support.apollo13.eu/discussion/2496/translation-problem/p1and can continue there talking about this to not mix different cases in one topic.
But I will test again without WPML to check how it works then.
PS. If you are happy with this theme please don't forget to rate us on ThemeForest - it helps us a lot! Thanks! How to rate?
With regards.