X-Cart Mods

X-Cart XFAQ v4.7.x

1 Upload the files from /upload to your store root.


2 In Admin > Tools > Patch/Upgrade, apply the SQL patch - patch_install_v4.7.x.sql.


3 In /skin/common_files/common_files.tpl ...

BEFORE...

{else}

INSERT...

{elseif $main eq 'xfaq_admin'}
{include file='admin/main/xfaq.tpl'}

{elseif $main eq 'xfaq'}
{include file='modules/XFaq/xfaq.tpl'}


4A In /skin/common_files/customer/service_head.tpl ...

REPLACE...

{get_title page_type=$meta_page_type page_id=$meta_page_id}

WITH...

{if $smarty.get.f ne '' && $smarty.get.q ne ''}
<title>{$faq.question|strip} - {$config.Company.company_name|escape}</title>
{else}
{get_title page_type=$meta_page_type page_id=$meta_page_id}
{/if}


4B In /skin/common_files/customer/service_head.tpl ...

REPLACE...

<link rel="canonical" href="{$canonical_url}" />

WITH...

{if $smarty.get.f ne '' && $smarty.get.q ne ''}
  <link rel="canonical" href="{$https_location}/faq.php?f={$faq.question|strip|lower|replace:' ':'-'|replace:'?':''}&q={$smarty.get.q}" />
{else}
  <link rel="canonical" href="{$canonical_url}" />
{/if}


4C In /skin/common_files/customer/service_head.tpl ...

BEFORE...

{load_defer_code type="css"}

INSERT...

{if $active_modules.XFaq}
  {include file="modules/XFaq/service_head.tpl"}
{/if}


5 In /skin/common_files/single/menu_box.tpl and if using X-Cart Platinum, /skin/common_files/admin/menu_box.tpl ...

AFTER...

{if $active_modules.Survey}
<a href="{$catalogs.admin}/surveys.php">{$lng.lbl_survey_surveys}</a>
{/if}

INSERT...

{if $active_modules.XFaq ne ""}
<a href="{$catalogs.admin}/xfaq.php">{$lng.lbl_xfaq_manager}</a>
{/if}


6 In Admin > Tools > Maintenance, clear the template cache.


DONE !

You'll see a new link in the admin header 'Content' dropdown menu, which takes you to the FAQ manager.

The FAQ page resides at /faq.php

© 2022 xcartmods.co.uk