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)
-   -   display customer reviews out of tabs (https://forum.x-cart.com/showthread.php?t=63067)

Powertrain 03-23-2012 06:36 PM

display customer reviews out of tabs
 
Is there a way to pull customer reviews out of tabs on product page?

I have tabs enabled and do like having "Send to friend", etc. in tabs but would like to display reviews below tabs.

I looked in the module files but didn't see where it tells it to display in tabs,
product_details template only says "if tabs are enabled" than tabs_ui template uses "foreach" statement to display extra items (including reviews obviously).

Is this controlled somewhere in core files?
Anyone knows which files?

Thanks.

Toora Designs 03-24-2012 08:35 PM

Re: display customer reviews out of tabs
 
in common_files/customer/main/product.tpl comment out
Code:

{*{if $product_tabs}
  {if $show_as_tabs}
    {include file="customer/main/ui_tabs.tpl" prefix="product-tabs-" mode="inline" tabs=$product_tabs}
  {else}
    {foreach from=$product_tabs item=tab key=ind}
      {include file=$tab.tpl}
    {/foreach}
  {/if}
{/if}*}


And add this below this code....
Code:

    {include file="customer/main/send_to_friend.tpl"}
    {include file="modules/Recommended_Products/recommends.tpl"}
    {include file="modules/Customer_Reviews/vote_reviews.tpl"}


Hope that works :)

Powertrain 03-24-2012 10:25 PM

Re: display customer reviews out of tabs
 
Thanks but that takes all 3 modules out of tabs, I'd like to keep "Send to friend" and "Recommended products" in tabs but display only reviews separate/below tabs.

Is there a way to control individual modules to go in tabs or not?

Which file determines this?
Like I said I looked in the Reviews module files but did not see anything so it must be somewhere in core files I assume.

I guess I could hard code ui_tabs and just include modules I want to show but I'm not sure what other modules can be displayed in tabs if enabled so I'd like to keep original ui_tabs code but modify Reviews module itself (or wherever the code for it is) to not display in tabs, if possible.

Thanks.

cflsystems 03-24-2012 10:28 PM

Re: display customer reviews out of tabs
 
Unfortunately QT hard coded the tabs. You need to modify include/product_tabs.php and comment out the code for recommended products

Code:

if (!empty($active_modules['Recommended_Products']) && !empty($recommends)) {
    $product_tabs[] = array(
        'title'  => func_get_langvar_by_name('txt_recommends_comment'),
        'tpl'    => 'modules/Recommended_Products/recommends.tpl',
        'anchor' => 'recommends'
    );
}


then in product.tpl add

Code:

{include file="modules/Recommended_Products/recommends.tpl"}

below the tabs code

Powertrain 03-25-2012 08:30 AM

Re: display customer reviews out of tabs
 
Thank you Steve :)

I was wondering where that code is :)

So I guess it might be better to just hard code tabs content in tabs template (in the theme) to keep core files not edited/hacked as much as possible for future upgrading?
Does that makes sense or does it matter, I guess as long as I keep notes on which files were edited should be ok.

What do you suggest?
Hack tpl files if possible and if not than hack core php files?

Thanks.

salsabeel 03-25-2012 11:53 AM

Re: display customer reviews out of tabs
 
Powertrain,

WinMerge is a useful tool to compare template files and easily find the changes you've made. It was mentioned in another thread here.

Powertrain 03-25-2012 01:23 PM

Re: display customer reviews out of tabs
 
Well I think I have all info I needed, Thanks for your help :)

Toora Designs 03-25-2012 01:27 PM

Re: display customer reviews out of tabs
 
Sorry, I miss read but looks like you got it :)


All times are GMT -8. The time now is 05:39 PM.

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