Tagged: x
-
AuthorPosts
-
June 1, 2016 at 8:00 pm #1021156
Hi there,
In WooCommerce, we have a link that goes to ADD TO BAG, and then a link that goes to see the product details.. this second link, is only active on the product name, which is not as user friendly as it could be.
How can we please make that whole area clickable – so if they click anywhere on the image it goes to the product detail.. unless they click on the ADD TO CART button, then this will just add the product but not move them away from that page.
Or at the very least, if the price could click through as well as the product name?
Thank you! )
(or at least the price area)
June 2, 2016 at 1:43 am #1021591Hi There,
Thanks for writing in! To assist you with this issue, we’ll first need you to provide us with your shop page URL. This is to ensure that we can provide you with a tailored answer to your situation. Once you have provided us with your URL, we will be happy to assist you with everything.
June 2, 2016 at 8:17 pm #1023324This reply has been marked as private.June 2, 2016 at 8:18 pm #1023325This reply has been marked as private.June 2, 2016 at 8:20 pm #1023326Also,on WooCommerce, I have some products with Variations .. and the code changes accordingly.
Sometimes I don’t want a default starting code, so I have removed, and only inserted codes in the variation .. BUT then for the default product image it says “N/A” for the code … Where please can I change the text “N/A” – I would rather say something like “Select an option above”.
Thanks.
June 3, 2016 at 3:43 am #1023844Hi There,
Thank you for the link.
To add link on the price, please open a text editor. Copy and paste the following code and then save as price.php. Upload this file on this folder of your child theme: wp-content\themes\x-child\woocommerce\loop<?php /** * Loop Price * * This template can be overridden by copying it to yourtheme/woocommerce/loop/price.php. * * HOWEVER, on occasion WooCommerce will need to update template files and you (the theme developer). * will need to copy the new files to your theme to maintain compatibility. We try to do this. * as little as possible, but it does happen. When this occurs the version of the template file will. * be bumped and the readme will list any important changes. * * @see http://docs.woothemes.com/document/template-structure/ * @author WooThemes * @package WooCommerce/Templates * @version 1.6.4 */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly } global $product; //echo "<pre>"; print_r($product); ?> <?php if ( $price_html = $product->get_price_html() ) : ?> <a href="<?php echo esc_url( get_permalink( $product->id ) ); ?>" rel="nofollow" class=""><span class="price"><?php echo $price_html; ?></span></a> <?php endif; ?>
Regarding the N/A, please do give us the exact URL where we can see the issue.
Hope this helps.
June 6, 2016 at 7:55 pm #1029033worked perfectly, thanks!
Apologies for my late reply back regarding my other question .. I did actually answer, I remember doing it .. but now I see my reply is not there so I must have had a connection issue when I sent it.
Re the N/A, What I am meaning, is that for example a shop item like this one (http://www.aboutfaceskinandhair.com.au/shop/mineral-makeup/bases/mineral-makeup-compact/) has several shades and the code changes for each shade…and because I have different SKU per shade, when they land on the first image, it says N/A for the SKU.
I would like to please be able to:
1. Initially, Remove the SKU reference altogether when it is a VARIATION shop item , and the SKU just appears again when an actual shade is chosen
(I recognize this might be not easy within the structure..) SO, this would also work:
2. Just change the text “N/A” to something of my choice.. like “Please select a shade”.
I imagine this option is pretty simple??
Thx so much
🙂
June 7, 2016 at 3:02 am #1029492Hello There,
Thank you for the clarification. Unfortunately, this part is not included in X theme customization of woocommerce. This is possible via customization which is beyond the scope of our support. Although, I can guide you on which template to edit. This variation of sku is handled by meta.php from this folder wp-content/plugins/woocommerce/templates/single-product/. You can find it on line 34 of the code. You may copy and paste this file on wp-content/themes/x-child/woocommerce/single-product. Then feel free to customize.
Hope this helps.
-
AuthorPosts