New Landing How can we help? Themeforest Theme Support Dante Closing discreption on the single product page when viewed product

Viewing 8 posts - 1 through 8 (of 8 total)
  • Posted in: Dante
  • #139739
    Wocan
    Member
    Post count: 63

    Hey guys.

    Can you let me know how I can close description on the single product page when the products are viewed for the first time?

    Byan

    #139749
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Hi

    Sorry not sure what you mean?

    – Kyle

    #139755
    Wocan
    Member
    Post count: 63

    ..on every single product page I will like to set the ACCORDION for the Product Description, Additional information and Reviews to close (not Having the Description open on first visit).

    B

    #139893
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    That should be the case by default, as long as you are using the latest version

    – Kyle

    #139895
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Appologies, seems we set it to open by default again.

    Add this to your child theme’s functions.php file:

    /* PRODUCT ACCORDION
    	================================================== */ 
    	if (!function_exists('sf_product_accordion')) {
    		function sf_product_accordion() {
    			global $woocommerce, $product, $post;
    			
    			$options = get_option('sf_dante_options');
    			if (isset($options['enable_pb_product_pages'])) {
    				$enable_pb_product_pages = $options['enable_pb_product_pages'];
    			} else {
    				$enable_pb_product_pages = false;
    			}
    			
    			$product_description = sf_get_post_meta($post->ID, 'sf_product_description', true);
    		?>
    			<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">
    			      		<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>
    		<?php 
    		}
    	}

    – Kyle

    #139896
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    You can also try this simple custom css code:-
    div#product-desc.accordion-body.collapse.in{height:0px;}

    Thanks
    Mohammad

    #140126
    Wocan
    Member
    Post count: 63

    Cheers Guys,
    … the simple custom css code:- works a treat,

    keep up the great support.

    B 2015.

    #140146
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Thanks Mohammad

    – Kyle

Viewing 8 posts - 1 through 8 (of 8 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