New Landing How can we help? Themeforest Theme Support Dante Additional Information

Viewing 10 posts - 1 through 10 (of 10 total)
  • Posted in: Dante
  • #72824
    costin
    Member
    Post count: 199

    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,
    Costin

    #72984
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Hi

    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

    #73200
    costin
    Member
    Post count: 199

    Hi 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!

    #73256
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    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 Ideas

    #73757
    costin
    Member
    Post count: 199
    This reply has been marked as private.
    #73844
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    Hi 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

    #73872
    costin
    Member
    Post count: 199
    This reply has been marked as private.
    #74134
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Hi

    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

    #74139
    costin
    Member
    Post count: 199

    Hi 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 pay

    Thank you,
    Costin

    #74375
    Melanie – SUPPORT
    Member
    Post count: 11032

    Hi, please consider hiring a developer of your trust via http://studio.envato.com/

    All the best

Viewing 10 posts - 1 through 10 (of 10 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register