Your Cart is currently empty!
Product update
Coupon
add
Coupon code invalid! Please re-enter!
AJAX loader
You are here: HomeForum
Welcome, Guest

Remove other content when viewing product.
(1 viewing) (1) Guest
Report Bugs, Userguide, New Ideas...
  • Page:
  • 1

TOPIC: Remove other content when viewing product.

Remove other content when viewing product. 10 years, 10 months ago #10226

Hi,

I would like to remove the welcome content and slideshow when a product is viewed? Please visit 92.234.8.130/sevenshopdev/index.php/ and view the products details to see what I mean.

The Welcome text & Slideshow is only set to be displayed on the home page so I am unsure why it is popping up on the products page.

Also I would like to remove the description TAB below a product as I will only be using the Quick Overview area to describe the product. Can you please advise be how to remove this feature whilst keeping the review option.

Thanks in advance

Re: Remove other content when viewing product. 10 years, 10 months ago #10235

  • loitt
  • OFFLINE
  • Platinum Boarder
  • Posts: 2222
  • Karma: 48
Dear oliver edwards,

About your questions:

1. I would like to remove the welcome content and slideshow when a product is viewed? Please visit 92.234.8.130/sevenshopdev/index.php/ and view the products details to see what I mean.

=> you can create a new menu item assigned to the vm category in the menu manager.

At that time, you will see the product detail pages.

2. Also I would like to remove the description TAB below a product as I will only be using the Quick Overview area to describe the product. Can you please advise be how to remove this feature whilst keeping the review option.

=> please do the following steps:

* go to "templates\sj_flowerstore\html\com_virtuemart\productdetails\default.php", finding:
			<div class="moduletabs top-position clearfix" id="moduletabs_vmdetail">
		
				<div class="tabs-container">
					<ul class="tabs">
						<?php // Product Description
						if (!empty($this->product->product_desc)) { ?>
							<li>
								<div class="tab selected product-description">
									<span class="intab">
										<?php echo JText::_('COM_VIRTUEMART_PRODUCT_DESC_TITLE') ?>
									</span>
								</div>
							</li>
						<?php } // Product Description END ?>
						<?php 
						if (!empty($this->product->customfieldsRelatedProducts)) { ?>
							<li>
								<div class="tab product-related-products">
									<span class="intab">
										<?php echo JText::_('COM_VIRTUEMART_RELATED_PRODUCTS'); ?>
									</span>
								</div>
							</li>
						<?php } // Product customfieldsRelatedProducts END	?>	
						<?php 
						if($this->showReview) {  ?>
							<li>
								<div class="tab">
									<span class="intab">
										<?php echo JText::_('COM_VIRTUEMART_REVIEWS') ?>
									</span>
								</div>
							</li>
						<?php } ?>	
					</ul>
				</div>
				<div class="tabs-content-wrap">
						<div class="tabs-content">
								<div class="tabs-content-inner">
										<?php 
										if (!empty($this->product->product_desc)) { ?>
											<div title="sj_module_2load:179" class="tab-content selected" style="display: block;">
												<!--end sj_extra_wrapper-->
												<?php echo $this->product->product_desc; ?>
											</div>
										<?php } // Product Description END ?>
										<?php 
										if (!empty($this->product->customfieldsRelatedProducts)) { ?>										
											<div title="sj_module_2load:180" class="tab-content" style="display: none;">
												<!--end sj_extra_wrapper-->
												<?php
												foreach ($this->product->customfieldsRelatedProducts as $field){
													?>
													<div class="product-field product-field-type-<?php echo $field->field_type ?>">
													<span class="product-field-display"><?php echo $field->display ?></span>
													<span class="product-field-desc"><?php echo jText::_($field->custom_field_desc) ?></span>
													</div>
													<?php
												} ?>
											</div>
										<?php } // Product customfieldsRelatedProducts END	?>	
										
										<?php // Customer Reviews
										if($this->allowRating || $this->showReview) { ?>
										
										<div title="sj_module_2load:181" class="tab-content" style="display: none;">
										<!--end sj_extra_wrapper-->
										<?php 
											$maxrating = VmConfig::get('vm_maximum_rating_scale',5);
											$ratingsShow = VmConfig::get('vm_num_ratings_show',3); // TODO add  vm_num_ratings_show in vmConfig
											//$starsPath = JURI::root().VmConfig::get('assets_general_path').'images/stars/';
											$stars = array();
											$showall = JRequest::getBool('showall', false);
											for ($num=0 ; $num <= $maxrating; $num++  ) {
												$title = (JText::_("COM_VIRTUEMART_RATING_TITLE") . $num . '/' . $maxrating) ;
												$stars[] = '<span class="vmicon vm2-stars'.$num.'" title="'.$title.'"></span>';
											} ?>

											<div class="customer-reviews">
												<form method="post" action="<?php echo JRoute::_('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id='.$this->product->virtuemart_product_id.'&virtuemart_category_id='.$this->product->virtuemart_category_id) ; ?>" name="reviewForm" id="reviewform">
										<?php
										} ?>
										<?php  if($this->showReview) {	 ?>	

											<div class="list-reviews">
												<?php
												$i=0;
												$review_editable=true;
												$reviews_published=0;
												if ($this->rating_reviews) {
													foreach($this->rating_reviews as $review ) {
														if ($i % 2 == 0) {
															$color = 'normal';
														} else {
															$color = 'highlight';
														}

														/* Check if user already commented */
														// if ($review->virtuemart_userid == $this->user->id ) {
														if ($review->created_by == $this->user->id && !$review->review_editable) {
															$review_editable = false;
														}
														?>

														<?php // Loop through all reviews
														//var_dump($review); die();
														if (!empty($this->rating_reviews) /*&& $review->published*/) {
															$reviews_published++;
															?>
														<div class="<?php echo $color ?>">
															<span class="date"><?php echo JHTML::date($review->created_on, JText::_('DATE_FORMAT_LC')); ?></span>
															<span class="bold"><?php echo $review->customer ?></span>
															<span class="sjrating r<?php echo $review->review_rates; ?> vote"></span>
															<blockquote><span class="open">&nbsp;</span><?php echo $review->comment; ?><span class="close">&nbsp;</span></blockquote>
															
														</div>
														<?php
														}
														$i++ ;
														if ( $i == $ratingsShow && !$showall) {
															/* Show all reviews ? */
															if ( $reviews_published >= $ratingsShow ) {
																$attribute = array('class'=>'details', 'title'=>JText::_('COM_VIRTUEMART_MORE_REVIEWS'));
																echo JHTML::link($this->more_reviews, JText::_('COM_VIRTUEMART_MORE_REVIEWS'),$attribute);
															}
															break;
														}
													}

												} else {
													// "There are no reviews for this product" ?>
													<span class="step"><?php echo JText::_('COM_VIRTUEMART_NO_REVIEWS') ?></span>
												<?php
												}  ?>
											<div class="clear"></div>
											</div>
										
											<?php // Writing A Review
											if($this->allowReview ) { ?>
											<div class="write-reviews">

												<?php // Show Review Length While Your Are Writing
												$reviewJavascript = "
												function check_reviewform() {
													var form = document.getElementById('reviewform');

													var ausgewaehlt = false;

													for (var i=0; i<form.vote.length; i++) {
														if (form.vote[i].checked) {
															ausgewaehlt = true;
														}
													}
														if (!ausgewaehlt)  {
															alert('".JText::_('COM_VIRTUEMART_REVIEW_ERR_RATE',false)."');
															return false;
														}
														else if (form.comment.value.length < ". VmConfig::get('reviews_minimum_comment_length', 100).") {
															alert('". addslashes( JText::sprintf('COM_VIRTUEMART_REVIEW_ERR_COMMENT1_JS', VmConfig::get('reviews_minimum_comment_length', 100)) )."');
															return false;
														}
														else if (form.comment.value.length > ". VmConfig::get('reviews_maximum_comment_length', 2000).") {
															alert('". addslashes( JText::sprintf('COM_VIRTUEMART_REVIEW_ERR_COMMENT2_JS', VmConfig::get('reviews_maximum_comment_length', 2000)) )."');
															return false;
														}
														else {
															return true;
														}
													}

													function refresh_counter() {
														var form = document.getElementById('reviewform');
														form.counter.value= form.comment.value.length;
													}";

												$document->addScriptDeclaration($reviewJavascript);

												if($this->showRating) {
													if($this->allowRating && $review_editable) { ?>
														<h4><?php echo JText::_('COM_VIRTUEMART_WRITE_REVIEW')  ?><span><?php echo JText::_('COM_VIRTUEMART_WRITE_FIRST_REVIEW') ?></span></h4>
														<span class="step"><?php echo JText::_('COM_VIRTUEMART_RATING_FIRST_RATE') ?></span>
														<ul class="rating">

														<?php // Print The Rating Stars + Checkboxes
														for ($num=0 ; $num<=$maxrating;  $num++ ) { ?>
															<li id="<?php echo $num ?>_stars">
																<label for="vote<?php echo $num ?>"><?php echo $stars[ $num ]; ?></label>
																<?php
																if ($num == 5) {
																	$selected = ' checked="checked"';
																} else {
																	$selected = '';
																} ?>
																<input<?php echo $selected ?> id="vote<?php echo $num ?>" type="radio" value="<?php echo $num ?>" name="vote">
															</li>
														<?php } ?>
														</ul>

														<?php

													}
												}
												if($review_editable ) { ?>
													<span class="step"><?php echo JText::sprintf('COM_VIRTUEMART_REVIEW_COMMENT', VmConfig::get('reviews_minimum_comment_length', 100), VmConfig::get('reviews_maximum_comment_length', 2000)); ?></span>
													<br />
													<textarea class="virtuemart" title="<?php echo JText::_('COM_VIRTUEMART_WRITE_REVIEW') ?>" class="inputbox" id="comment" onblur="refresh_counter();" onfocus="refresh_counter();" onkeyup="refresh_counter();" name="comment" rows="5" cols="60"><?php if(!empty($this->review->comment))echo $this->review->comment; ?></textarea>
													<br />
													<span><?php echo JText::_('COM_VIRTUEMART_REVIEW_COUNT') ?>
													<input type="text" value="0" size="4" class="vm-default" name="counter" maxlength="4" readonly="readonly" />
													</span>
													<br /><br />
													<span class="sj-bt submitbtn">
														<span><input class="highlight-button" type="submit" onclick="return( check_reviewform());" name="submit_review" title="<?php echo JText::_('COM_VIRTUEMART_REVIEW_SUBMIT')  ?>" value="<?php echo JText::_('COM_VIRTUEMART_REVIEW_SUBMIT')  ?>" />
														</span>
													</span>
												</div>
												<?php
												} else {
													echo '<strong>'.JText::_('COM_VIRTUEMART_DEAR').$this->user->name.',</strong><br />' ;
													echo JText::_('COM_VIRTUEMART_REVIEW_ALREADYDONE');
												?>
												</div>
												<?php
												}
											}
											// End Writing A Review										
										 } 
										if($this->allowRating || $this->showReview) { ?>
												<input type="hidden" name="virtuemart_product_id" value="<?php echo $this->product->virtuemart_product_id; ?>" />
												<input type="hidden" name="option" value="com_virtuemart" />
												<input type="hidden" name="virtuemart_category_id" value="<?php echo JRequest::getInt('virtuemart_category_id'); ?>" />
												<input type="hidden" name="virtuemart_rating_review_id" value="0" />
												<input type="hidden" name="task" value="review" />
											</form>
										</div>
										<?php
										}
										// else echo JText::_('COM_VIRTUEMART_REVIEW_LOGIN'); // Login to write a review!
										?>			
										
										</div>
										<div class="clear"></div>
								</div>
						</div>
					<div class="clear"></div>
				</div>
				

change to:
						<div class="moduletabs top-position clearfix" id="moduletabs_vmdetail">
		
				<div class="tabs-container">
					<ul class="tabs">
						
						<?php 
						if($this->showReview) {  ?>
							<li>
								<div class="tab selected product-review">
									<span class="intab">
										<?php echo JText::_('COM_VIRTUEMART_REVIEWS') ?>
									</span>
								</div>
							</li>
						<?php } ?>	
					</ul>
				</div>
				<div class="tabs-content-wrap">
						<div class="tabs-content">
								<div class="tabs-content-inner">									
										
										<?php // Customer Reviews
										if($this->allowRating || $this->showReview) { ?>
										
										<div title="sj_module_2load:181" class="tab-content selected" style="display: none;">
										<!--end sj_extra_wrapper-->
										<?php 
											$maxrating = VmConfig::get('vm_maximum_rating_scale',5);
											$ratingsShow = VmConfig::get('vm_num_ratings_show',3); // TODO add  vm_num_ratings_show in vmConfig
											//$starsPath = JURI::root().VmConfig::get('assets_general_path').'images/stars/';
											$stars = array();
											$showall = JRequest::getBool('showall', false);
											for ($num=0 ; $num <= $maxrating; $num++  ) {
												$title = (JText::_("COM_VIRTUEMART_RATING_TITLE") . $num . '/' . $maxrating) ;
												$stars[] = '<span class="vmicon vm2-stars'.$num.'" title="'.$title.'"></span>';
											} ?>

											<div class="customer-reviews">
												<form method="post" action="<?php echo JRoute::_('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id='.$this->product->virtuemart_product_id.'&virtuemart_category_id='.$this->product->virtuemart_category_id) ; ?>" name="reviewForm" id="reviewform">
										<?php
										} ?>
										<?php  if($this->showReview) {	 ?>	

											<div class="list-reviews">
												<?php
												$i=0;
												$review_editable=true;
												$reviews_published=0;
												if ($this->rating_reviews) {
													foreach($this->rating_reviews as $review ) {
														if ($i % 2 == 0) {
															$color = 'normal';
														} else {
															$color = 'highlight';
														}

														/* Check if user already commented */
														// if ($review->virtuemart_userid == $this->user->id ) {
														if ($review->created_by == $this->user->id && !$review->review_editable) {
															$review_editable = false;
														}
														?>

														<?php // Loop through all reviews
														//var_dump($review); die();
														if (!empty($this->rating_reviews) /*&& $review->published*/) {
															$reviews_published++;
															?>
														<div class="<?php echo $color ?>">
															<span class="date"><?php echo JHTML::date($review->created_on, JText::_('DATE_FORMAT_LC')); ?></span>
															<span class="bold"><?php echo $review->customer ?></span>
															<span class="sjrating r<?php echo $review->review_rates; ?> vote"></span>
															<blockquote><span class="open">&nbsp;</span><?php echo $review->comment; ?><span class="close">&nbsp;</span></blockquote>
															
														</div>
														<?php
														}
														$i++ ;
														if ( $i == $ratingsShow && !$showall) {
															/* Show all reviews ? */
															if ( $reviews_published >= $ratingsShow ) {
																$attribute = array('class'=>'details', 'title'=>JText::_('COM_VIRTUEMART_MORE_REVIEWS'));
																echo JHTML::link($this->more_reviews, JText::_('COM_VIRTUEMART_MORE_REVIEWS'),$attribute);
															}
															break;
														}
													}

												} else {
													// "There are no reviews for this product" ?>
													<span class="step"><?php echo JText::_('COM_VIRTUEMART_NO_REVIEWS') ?></span>
												<?php
												}  ?>
											<div class="clear"></div>
											</div>
										
											<?php // Writing A Review
											if($this->allowReview ) { ?>
											<div class="write-reviews">

												<?php // Show Review Length While Your Are Writing
												$reviewJavascript = "
												function check_reviewform() {
													var form = document.getElementById('reviewform');

													var ausgewaehlt = false;

													for (var i=0; i<form.vote.length; i++) {
														if (form.vote[i].checked) {
															ausgewaehlt = true;
														}
													}
														if (!ausgewaehlt)  {
															alert('".JText::_('COM_VIRTUEMART_REVIEW_ERR_RATE',false)."');
															return false;
														}
														else if (form.comment.value.length < ". VmConfig::get('reviews_minimum_comment_length', 100).") {
															alert('". addslashes( JText::sprintf('COM_VIRTUEMART_REVIEW_ERR_COMMENT1_JS', VmConfig::get('reviews_minimum_comment_length', 100)) )."');
															return false;
														}
														else if (form.comment.value.length > ". VmConfig::get('reviews_maximum_comment_length', 2000).") {
															alert('". addslashes( JText::sprintf('COM_VIRTUEMART_REVIEW_ERR_COMMENT2_JS', VmConfig::get('reviews_maximum_comment_length', 2000)) )."');
															return false;
														}
														else {
															return true;
														}
													}

													function refresh_counter() {
														var form = document.getElementById('reviewform');
														form.counter.value= form.comment.value.length;
													}";

												$document->addScriptDeclaration($reviewJavascript);

												if($this->showRating) {
													if($this->allowRating && $review_editable) { ?>
														<h4><?php echo JText::_('COM_VIRTUEMART_WRITE_REVIEW')  ?><span><?php echo JText::_('COM_VIRTUEMART_WRITE_FIRST_REVIEW') ?></span></h4>
														<span class="step"><?php echo JText::_('COM_VIRTUEMART_RATING_FIRST_RATE') ?></span>
														<ul class="rating">

														<?php // Print The Rating Stars + Checkboxes
														for ($num=0 ; $num<=$maxrating;  $num++ ) { ?>
															<li id="<?php echo $num ?>_stars">
																<label for="vote<?php echo $num ?>"><?php echo $stars[ $num ]; ?></label>
																<?php
																if ($num == 5) {
																	$selected = ' checked="checked"';
																} else {
																	$selected = '';
																} ?>
																<input<?php echo $selected ?> id="vote<?php echo $num ?>" type="radio" value="<?php echo $num ?>" name="vote">
															</li>
														<?php } ?>
														</ul>

														<?php

													}
												}
												if($review_editable ) { ?>
													<span class="step"><?php echo JText::sprintf('COM_VIRTUEMART_REVIEW_COMMENT', VmConfig::get('reviews_minimum_comment_length', 100), VmConfig::get('reviews_maximum_comment_length', 2000)); ?></span>
													<br />
													<textarea class="virtuemart" title="<?php echo JText::_('COM_VIRTUEMART_WRITE_REVIEW') ?>" class="inputbox" id="comment" onblur="refresh_counter();" onfocus="refresh_counter();" onkeyup="refresh_counter();" name="comment" rows="5" cols="60"><?php if(!empty($this->review->comment))echo $this->review->comment; ?></textarea>
													<br />
													<span><?php echo JText::_('COM_VIRTUEMART_REVIEW_COUNT') ?>
													<input type="text" value="0" size="4" class="vm-default" name="counter" maxlength="4" readonly="readonly" />
													</span>
													<br /><br />
													<span class="sj-bt submitbtn">
														<span><input class="highlight-button" type="submit" onclick="return( check_reviewform());" name="submit_review" title="<?php echo JText::_('COM_VIRTUEMART_REVIEW_SUBMIT')  ?>" value="<?php echo JText::_('COM_VIRTUEMART_REVIEW_SUBMIT')  ?>" />
														</span>
													</span>
												</div>
												<?php
												} else {
													echo '<strong>'.JText::_('COM_VIRTUEMART_DEAR').$this->user->name.',</strong><br />' ;
													echo JText::_('COM_VIRTUEMART_REVIEW_ALREADYDONE');
												?>
												</div>
												<?php
												}
											}
											// End Writing A Review										
										 } 
										if($this->allowRating || $this->showReview) { ?>
												<input type="hidden" name="virtuemart_product_id" value="<?php echo $this->product->virtuemart_product_id; ?>" />
												<input type="hidden" name="option" value="com_virtuemart" />
												<input type="hidden" name="virtuemart_category_id" value="<?php echo JRequest::getInt('virtuemart_category_id'); ?>" />
												<input type="hidden" name="virtuemart_rating_review_id" value="0" />
												<input type="hidden" name="task" value="review" />
											</form>
										</div>
										<?php
										}
										// else echo JText::_('COM_VIRTUEMART_REVIEW_LOGIN'); // Login to write a review!
										?>			
										
										</div>
										<div class="clear"></div>
								</div>
						</div>
					<div class="clear"></div>
				</div>


Thanks
Ticket System | Join our Clubs to download our extensions and templates

Re: Remove other content when viewing product. 10 years, 10 months ago #10239

hi,

With regards tot he details tab when I make the changes above the right bar is moved under the content, please see the below link;

92.234.8.130/sevenshopdev/index.php/everyday/scented-posy-basket-detail.html

Thanks in advance

Re: Remove other content when viewing product. 10 years, 10 months ago #10240

Could you also explain the below a little more?

I am unsure what you mean

'you can create a new menu item assigned to the vm category in the menu manager.'

Thanks in advance

Re: Remove other content when viewing product. 10 years, 10 months ago #10242

UPDATE - I have worked out the Menu Item to remove other data but am still seeing the right bar not floating to the right. It sits under the main content.

Re: Remove other content when viewing product. 10 years, 10 months ago #10278

  • SA Thuy
Dear oliver edwards,

About the mean of 'you can create a new menu item assigned to the vm category in the menu manager.' Because, if set default, vm category will be displayed in home page, when you set menu assigned to vm category, your module Welcome text & Slideshow will don't choose in Module Assignment field.


Please explain your mean about the right bar is moved under the content, could you please send screenshots to us?

Thanks
  • Page:
  • 1
Time to create page: 0.23 seconds

Notification

Please find your issue via Suggested Posts before submitting your question. We have solved the most of issues and maybe your issue was solved before.

Latest My Topics

No posts to display.

Love all our templates?

Join our membership clubs starting at $49 only for access to all of our templates

Join Now
Home Pricing
Your Cart is currently empty!
Product update
Coupon
add
Coupon code invalid! Please re-enter!
AJAX loader
SearchSupport
Magento Themes Magento Extensions Free Magento Extensions Prestashop Themes Prestashop Modules Magento 2 Themes