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

Product review problem
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: Product review problem

Product review problem 10 years, 2 months ago #16012

Hello guys, I have another problem ....I am bulding eshop. Now I have tested reviews on product page .... I wrote it ..... On the product page I can see 4 of 5 stars even if I have voted 5 stars (probably just a wong picture of the stars)... Another problem is that in the category view there is written no votes..... could You help me to correct it, please ? The category view page is: www.chezcecile.cz/index.php/dzemy-a-marmelady
Thank You in advance for quick help. Petr
Last Edit: 10 years, 2 months ago by peetee.

Re: Product review problem 10 years, 2 months ago #16122

Dear

Please go to your_site\templates\sj_jare25\html\com_virtuemart\productdetails\default.phpand find:

$ratingwidth = $this->rating->rating * 13; //*24; //I don't use round as percetntage with works perfect, as for me

=>

$ratingwidth = $this->rating->rating * 16; //*24; //I don't use round as percetntage with works perfect, as for me


- go to your_site\your_site\templates\sj_jare25\html\com_virtuemart\productdetails\default_reviews.php and find:

$ratingWidth = $maxrating * 13; //24;
	for ($num = 0; $num <= $maxrating; $num++) {
		$stars[] = '
				<span title="' . (JText::_ ("COM_VIRTUEMART_RATING_TITLE") . $num . '/' . $maxrating) . '" class="vmicon ratingbox" style="display:inline-block;width:' . 13 * $maxrating . 'px;">
					<span class="stars-orange" style="width:' . (13 * $num) . 'px">
					</span>
				</span>';
	} ?>

=>


$ratingWidth = $maxrating * 16; //24;
	for ($num = 0; $num <= $maxrating; $num++) {
		$stars[] = '
				<span title="' . (JText::_ ("COM_VIRTUEMART_RATING_TITLE") . $num . '/' . $maxrating) . '" class="vmicon ratingbox" style="display:inline-block;width:' . 16 * $maxrating . 'px;">
					<span class="stars-orange" style="width:' . (16 * $num) . 'px">
					</span>
				</span>';
	} ?>


Thanks!

Re: Product review problem 10 years, 2 months ago #16155

OK, thank You very much to solve the problem with the amount of the star ..... could You also try to help with the other problem ... I have rated the item I can see the stars in the product page (even in in the description) but there in no star in the category view .... there is still written not rated yet. Thank You in advance. Petr
Last Edit: 10 years, 2 months ago by peetee.

Re: Product review problem 10 years, 2 months ago #16220

Dear peetee,

Please go to your_site\templates\sj_jare25\html\com_virtuemart\category\default.php and find:

<div class="vote-rating">
					<?php
					if ($this->showRating) {
						$maxrating = VmConfig::get('vm_maximum_rating_scale', 5);
			
						if (empty($this->rating)) { ?>
							<span class="vote"><?php echo JText::_('COM_VIRTUEMART_RATING') . ' ' . JText::_('COM_VIRTUEMART_UNRATED') ?></span>
						<?php } else {
							$ratingwidth = $this->rating->rating * 13; //*24; //I don't use round as percetntage with works perfect, as for me
						?>
							<span class="vote">
								<span title=" <?php echo (JText::_("COM_VIRTUEMART_RATING_TITLE") . round($this->rating->rating) . '/' . $maxrating) ?>" class="ratingbox" style="display:inline-block;">
									<span class="stars-orange" style="width:<?php echo $ratingwidth.'px'; ?>"></span>
								</span>
								<span class="vote-number">
									<?php //echo JText::_('COM_VIRTUEMART_RATING') . ' ' . round($this->rating->rating) . '/' . $maxrating; ?>
									<?php if(round($this->rating->rating)>1) echo '( '. round($this->rating->rating) . ' Votes)'; else echo '( '. round($this->rating->rating) . ' Vote)'; ?>
								</span>
							</span>
						<?php
						}
					}
					
					?>
					</div>

=>

<div class="vote-rating">
					<?php 
					
						$ratingModel = VmModel::getModel('ratings');
						
						$showRating = $ratingModel->showRating($product->virtuemart_product_id);
						
						$product->product_rating = '';
						
						//$product_rating = '';
						
						if ($showRating) {
						
							$product_rating = $ratingModel->getRatingByProduct($product->virtuemart_product_id);
						
							if(!empty($product_rating)){
								$product->product_rating = $product_rating->rating;
							}
						}						
					 ?>
					 <?php
							if (!empty($product->product_rating)) {
								$maxrating = VmConfig::get('vm_maximum_rating_scale', 5);
					
								$ratingwidth = $product->product_rating * 16; //*24; //I don't use round as percetntage with works perfect, as for me
								?>
									<span class="vote">
										<span title=" <?php echo (JText::_("COM_VIRTUEMART_RATING_TITLE") . round($product->product_rating) . '/' . $maxrating) ?>" class="ratingbox" style="display:inline-block;">
											<span class="stars-orange" style="width:<?php echo $ratingwidth.'px'; ?>"></span>
										</span>
										<span class="vote-number">
											<?php //echo JText::_('COM_VIRTUEMART_RATING') . ' ' . round($item->product_rating) . '/' . $maxrating; ?>
											<?php if(round($product->product_rating)>1) echo '( '. round($product->product_rating) . ' Votes)'; else echo '( '. round($product->product_rating) . ' Vote)'; ?>
										</span>
									</span>
								<?php
							}else{
								echo JText::_('COM_VIRTUEMART_RATING') . ' ' . JText::_('COM_VIRTUEMART_UNRATED');
							}
						?>
					</div>


Thanks!

Re: Product review problem 10 years, 2 months ago #16228

Excelent - thank You. Works like a charm....... Peetee
Last Edit: 10 years, 2 months ago by peetee.

Re: Product review problem 10 years, 2 months ago #16237

One more thing with this please - how to make it multilanguage ? I tied to do myself but ... do not know to do it properly .... (<?php if(round($product->product_rating)>1) echo '( '. round($product->product_rating) . ' Votes)'; else echo '( '. round($product->product_rating) . ' Vote)'; ?>)
Thank You in advance. Petr
Last Edit: 10 years, 2 months ago by peetee.
  • Page:
  • 1
Time to create page: 0.30 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