Digital experiences for all disciplines
New Landing › How can we help? › Themeforest Theme Support › Dante › Additional Information
New Landing › How can we help? › Themeforest Theme Support › Dante › Additional Information
- This topic has 9 replies, 5 voices, and was last updated 10 years by Melanie – SUPPORT.
-
Posted in: Dante
-
May 7, 2014 at 5:13 am #72824
Hi,
Please let me know how can I achieve the following:
1) In single product – Description to be closed by default and Additional Information to be opened by default
2) To swap places between Description and Additional Information
3) How can I write a text under the price which will be visible only in single product page?
Thank you very much,
CostinMay 7, 2014 at 11:45 am #72984Hi
Ok open up sf-woocommerce.php in the swift-framework folder. Find this:
<div class="panel-group" id="product-accordion"> <div class="panel panel-default"> <div class="panel-heading"> <a class="accordion-toggle" data-toggle="collapse" data-parent="#product-accordion" href="#product-desc"> <?php _e("Description", "swiftframework"); ?> </a> </div> <div id="product-desc" class="accordion-body collapse in"> <div class="accordion-inner" itemprop="description"> <?php if ($enable_pb_product_pages) { echo do_shortcode(sf_add_formatting($product_description)); } else { the_content(); } ?> </div> </div> </div> <div class="panel"> <div class="panel-heading"> <a class="accordion-toggle collapsed" data-toggle="collapse" data-parent="#product-accordion" href="#additional-information"> <?php _e("Additional Information", "swiftframework"); ?> </a> </div> <div id="additional-information" class="accordion-body collapse"> <div class="accordion-inner"> <?php $product->list_attributes(); ?> </div> </div> </div> <?php if ( comments_open() ) : ?> <div class="panel"> <div class="panel-heading"> <a class="accordion-toggle collapsed" data-toggle="collapse" data-parent="#product-accordion" href="#reviews"> <?php _e("Reviews", "swiftframework"); ?> (<?php echo comments_number( '0', '1', '%' ); ?>) </a> </div> <div id="reviews" class="accordion-body collapse"> <div class="accordion-inner"> <?php comments_template(); ?> </div> </div> </div> <?php endif; ?> </div>
and replace with:
<div class="panel-group" id="product-accordion"> <div class="panel panel-default"> <div class="panel-heading"> <a class="accordion-toggle collapse in" data-toggle="collapse" data-parent="#product-accordion" href="#additional-information"> <?php _e("Additional Information", "swiftframework"); ?> </a> </div> <div id="additional-information" class="accordion-body collapse in"> <div class="accordion-inner"> <?php $product->list_attributes(); ?> </div> </div> </div> <div class="panel"> <div class="panel-heading"> <a class="accordion-toggle collapsed" data-toggle="collapse" data-parent="#product-accordion" href="#product-desc"> <?php _e("Description", "swiftframework"); ?> </a> </div> <div id="product-desc" class="accordion-body collapse"> <div class="accordion-inner" itemprop="description"> <?php if ($enable_pb_product_pages) { echo do_shortcode(sf_add_formatting($product_description)); } else { the_content(); } ?> </div> </div> </div> <?php if ( comments_open() ) : ?> <div class="panel"> <div class="panel-heading"> <a class="accordion-toggle collapsed" data-toggle="collapse" data-parent="#product-accordion" href="#reviews"> <?php _e("Reviews", "swiftframework"); ?> (<?php echo comments_number( '0', '1', '%' ); ?>) </a> </div> <div id="reviews" class="accordion-body collapse"> <div class="accordion-inner"> <?php comments_template(); ?> </div> </div> </div> <?php endif; ?> </div>
– Kyle
May 7, 2014 at 8:51 pm #73200Hi Kyle,
Thank you very much for the code, works perfect!
For the third question could you also answer me please? I need to have a field where to add additional info below the price.
Thank you!
May 8, 2014 at 5:31 am #73256Hi,
Please open to edit content-single-product.php at /themes/dante/woocommerce/Find this code at line 62 <p itemprop="price" class="price"><?php echo $product->get_price_html(); ?></p> and change like this as i put sku below price <p itemprop="price" class="price"><?php echo $product->get_price_html(); ?><BR> Style no:<?php echo $product->get_sku()?></p>
Hope it should work 100% .
With Best Regards
Swift IdeasMay 9, 2014 at 1:28 pm #73757This reply has been marked as private.May 9, 2014 at 11:28 pm #73844Hi Costin,
Both of these aren’t really in the scope of our standard support, but I’ll assist where I can.
1) The best way to do this would be by adding a custom field for each product, i.e. “ready-to-sail”. Then you’d need to edit /woocommerce/content-single-product.php and below line 79 add:
<div class="ready-to-sail"><?php echo get_post_meta($post->ID, 'ready-to-sail', true); ?></div>
2) Try adding this code to your child theme functions.php file:
remove_action('woocommerce_single_product_summary', 'woocommerce_template_single_meta', 40); remove_action('woocommerce_template_single_meta', 'woocommerce_single_product_summary', 25);
Hope that helps.
– Ed
May 10, 2014 at 9:40 am #73872This reply has been marked as private.May 12, 2014 at 12:47 pm #74134Hi
Unfortunately the the method that Ed has provided above is the best we can help you, if you ened further customisation you will need to hire a developer as it’s not a simple change.
– Kyle
May 12, 2014 at 12:55 pm #74139Hi Kyle,
1) Maybe it will help other users too: please note that I’ve fixed this by writing the text in Meta Options/Product Meta/Product Short Description and now the text is appearing under the price
2) I appreciate the help of both you and Ed but the solution is not moving the content but deletes it.
So I would really appreciate if you can tell me what content I have to swap as I believe this is an easy thing for your coding skills :). I would be ready to payThank you,
CostinMay 13, 2014 at 7:00 am #74375Hi, please consider hiring a developer of your trust via http://studio.envato.com/
All the best
-
Posted in: Dante
You must be logged in and have valid license to reply to this topic.