X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   advanced customer rating (https://forum.x-cart.com/showthread.php?t=72471)

fiberglass.supply 07-22-2015 06:24 AM

advanced customer rating
 
version 4.6.6 in advanced customer rating,

how do i put a line break between the stars and the actual ratings . I know how to add a <br /> Just not sure in what file to split the stars from the ratings and votes.

cflsystems 07-22-2015 06:26 AM

Re: advanced customer rating
 
Use the webmaster mode - it will tell you exactly which template to edit

fiberglass.supply 07-22-2015 06:54 AM

Re: advanced customer rating
 
Awesome thank you found the right file.

But still not sure where to add <br />

this is the code,
Code:

{if $general_rating}
<div class="acr-general-product-rating">

{if $use_rich_snippet && $general_rating.rating_level gt 0}
  {if !$active_modules.Rich_Google_Search_Results}
  <div itemscope itemtype="http://schema.org/Product">
  <meta itemprop="name" content="{$product.product}" />
  {/if}

    <div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
      <meta itemprop="ratingValue" content="{$general_rating.rating_level}" />
      <meta itemprop="bestRating" content="{$stars.length}" />
      {if $general_rating.reviews_total gt 0}
      <meta itemprop="reviewCount" content="{$general_rating.reviews_total}" />
      {/if}
      {if $general_rating.votes_total gt 0 && $general_rating.reviews_total eq 0}
      <meta itemprop="ratingCount" content="{$general_rating.votes_total}" />
      {/if}
    </div>

  {if !$active_modules.Rich_Google_Search_Results}
  </div>
  {/if}
{/if}

{if $general_rating.total gt 0 && $show_detailed_ratings neq 'Y'}
  {assign var=use_dropdown_button value='Y'}
  {assign var=colspan value=3}
{else}
  {assign var=use_dropdown_button value='N'}
  {assign var=colspan value=2}
{/if}

<table class="acr-container{if $is_multicolumns eq "Y"}-multicolumns{/if}">
  <tr>
    <td class="left-indent">&nbsp;</td>

    <td class="rating-box">
      <div style="width: {$smarty.const.ACR_STARS_RATING_WIDTH}px">{include file="modules/Advanced_Customer_Reviews/vote_bar.tpl" rating=$general_rating}</div>
    </td>

    {if $use_dropdown_button eq 'Y'}
    <td class="dropdown-button" title="{$lng.lbl_acr_click_dropdown}">
      <a href="{$xcart_web_dir}/get_block.php?block=acr_get_product_ratings&amp;productid={$productid}"><img src="{$ImagesDir}/acr_reviews_dropout_down.png" alt="" /></a>
    </td>
    {/if}

    <td class="comment" nowrap="nowrap">
      (<a href="reviews.php?productid={$productid}{if $cat}&amp;cat={$cat}{/if}">{$general_rating.total} {$lng.lbl_acr_reviews}</a>)
    </td>

    <td class="right-indent">&nbsp;</td>
  </tr>

  <tr>
    <td class="left-indent"></td>
    <td colspan="{$colspan}"><div class="acr-static-popup-container"></div></td>
    <td class="right-indent"></td>
  </tr>

</table>
</div>
{load_defer file="modules/Advanced_Customer_Reviews/func.js" type="js"}
{/if}


cflsystems 07-22-2015 07:26 AM

Re: advanced customer rating
 
It's in the table so you can't put a line break. You need to either make 2 rows or combine cells to use line break

Code:

<table class="acr-container{if $is_multicolumns eq "Y"}-multicolumns{/if}">
  <tr>
    <td class="left-indent">&nbsp;</td>

{* THIS IS THE RATING *}
    <td class="rating-box">
      <div style="width: {$smarty.const.ACR_STARS_RATING_WIDTH}px">{include file="modules/Advanced_Customer_Reviews/vote_bar.tpl" rating=$general_rating}</div>
    </td>

{* THIS IS THE DROPDOWN ARROW *}

    {if $use_dropdown_button eq 'Y'}
    <td class="dropdown-button" title="{$lng.lbl_acr_click_dropdown}">
      <a href="{$xcart_web_dir}/get_block.php?block=acr_get_product_ratings&amp;productid={$productid}"><img src="{$ImagesDir}/acr_reviews_dropout_down.png" alt="" /></a>
    </td>
    {/if}

{* THIS IS THE SCORE/REVIEWS NUMBER TEXT *}
    <td class="comment" nowrap="nowrap">
      (<a href="reviews.php?productid={$productid}{if $cat}&amp;cat={$cat}{/if}">{$general_rating.total} {$lng.lbl_acr_reviews}</a>)
    </td>

    <td class="right-indent">&nbsp;</td>
  </tr>

  <tr>
    <td class="left-indent"></td>
    <td colspan="{$colspan}"><div class="acr-static-popup-container"></div></td>
    <td class="right-indent"></td>
  </tr>

</table>


fiberglass.supply 07-22-2015 08:39 AM

Re: advanced customer rating
 
I took out the dropdown all together, its on the review page anyways

I change the bottom part of that file to this,

Code:


<table class="acr-container{if $is_multicolumns eq "Y"}-multicolumns{/if}">
  <tr>
    <td class="rating-box">

      <div style="width: {$smarty.const.ACR_STARS_RATING_WIDTH}px">{include file="modules/Advanced_Customer_Reviews/vote_bar.tpl" rating=$general_rating}
          <br />
            (<a href="reviews.php?productid={$productid}{if $cat}&amp;cat={$cat}{/if}">{$general_rating.total} {$lng.lbl_acr_reviews}</a>)
      </div>

      /td>
  </tr>
</table>


And now my site looks nicer.


All times are GMT -8. The time now is 01:13 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.