1 Upload the files from /upload
to your store root.
Ensure /gallery
is writable (CHMOD 0777).
2 In Admin > Tools > Patch/Upgrade
, apply the SQL patch - patch_install_v4.7.x.sql
.
3 In /product.php
...
BEFORE...
// Define product tabs
include $xcart_dir . '/include/product_tabs.php';
INSERT...
// Check for product galleries
if (!empty($active_modules['XGallery'])) {
include $xcart_dir . '/product_galleries.php';
}
4 In /include/product_tabs.php
...
AFTER...
$product_tabs = array();
INSERT...
# Product XGallery
if (!empty($active_modules['XGallery']) && $config['XGallery']['xgallery_enabled'] == 'Y' && $gallery_images && $config['XGallery']['xgallery_product_tab'] == 'Y') {
$product_tabs[] = array(
'title' => func_get_langvar_by_name('lbl_xgallery'),
'tpl' => 'modules/XGallery/xgallery_product.tpl',
'anchor' => 'xgallery'
);
}
# /Product XGallery
5 In /skin/common_files/common_files.tpl
...
BEFORE...
{else}
INSERT...
{elseif $main eq 'xgallery_admin'}
{include file='admin/main/xgallery.tpl'}
{elseif $main eq 'xgallery'}
{include file='modules/XGallery/xgallery.tpl'}
6A In /skin/common_files/customer/service_head.tpl
...
REPLACE...
{get_title page_type=$meta_page_type page_id=$meta_page_id}
WITH...
{if $faq ne ""}
<title>{$faq.question|strip} - {$config.Company.company_name|escape}</title>
{elseif $gallery ne ""}
<title>{$gallery.name|strip} - {$config.Company.company_name|escape}</title>
{else}
{get_title page_type=$meta_page_type page_id=$meta_page_id}
{/if}
6B In /skin/common_files/customer/service_head.tpl
...
BEFORE...
{load_defer_code type="css"}
INSERT...
{if $active_modules.XGallery}
{include file="modules/XGallery/service_head.tpl"}
{/if}
7 In /skin/common_files/customer/meta.tpl
...
(File location may differ if using alternative skin)
REPLACE...
{meta type='description' page_type=$meta_page_type page_id=$meta_page_id}
WITH...
{if $gallery ne '' && $gallery.descr ne ''}
<meta name='description' content='{$gallery.descr|strip|truncate:160}' />
{else}
{meta type='description' page_type=$meta_page_type page_id=$meta_page_id}
{/if}
8 In /skin/common_files/customer/main/product.tpl
...
(File location may differ if using alternative skin)
BEFORE...
{if $product_tabs}
INSERT...
{* XGallery *}
{if $active_modules.XGallery && $config.XGallery.xgallery_enabled eq "Y" && $gallery_images && $config.XGallery.xgallery_product_tab ne "Y"}
{capture name=dialog}
{include file="modules/XGallery/xgallery_product.tpl"}
{/capture}
{include file="customer/dialog.tpl" title=$lng.lbl_xgallery content=$smarty.capture.dialog noborder=false}
{/if}
{* /XGallery *}
9 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.Testimonials ne ""}
<a href="{$catalogs.admin}/testimonials.php">{$lng.lbl_testimonials}</a><br />
{/if}
INSERT...
{if $active_modules.XGallery ne ""}
<a href="{$catalogs.admin}/xgallery.php">{$lng.lbl_xgallery_manager}</a>
{/if}
10 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 XGallery manager and module settings.
The gallery page resides at /gallery.php
Prior to uploading your gallery images, we recommend you name them 'neatly' using hyphens or underscrores instead of spaces and include keywords describing the images, eg.
picture_of_something.jpg
The uploader will automatically use the image filenames as the image caption titles, although you can always edit the titles afterwards.
© 2022 xcartmods.co.uk