网络营销电子商务研究中心  
How to buy the best prescription safety glasses in Canada? Let's study!
Go Back   网络营销电子商务研究中心 > 网站建设 > X-Cart
User Name
Password
 
FAQ Members List Calendar Cheap Glasses

Reply
 
Thread Tools Display Modes
  #1   IP: 76.164.216.30
Old 2016-05-06, 10:29 PM
Bethel Park Bethel Park is offline
初级会员
 
Join Date: 2005-07-21
Posts: 2
Bethel Park 现在声名狼藉
Default X-cart 5:How to modify Contact Us meta tags?

At www.cheapglasses.net, I found the following pages have the same description:
Contact us
My Account
Register

<meta name="description" content="The powerful shopping cart software for web stores and e-commerce enabled stores is based on PHP5 with SQL database with highly configurable implementation based on templates" />

How can we modify each page's meta tags (title, description,keywords),pls?
Reply With Quote
  #2   IP: 76.164.216.30
Old 2016-05-06, 10:30 PM
Kailynn Kailynn is offline
初级会员
 
Join Date: 2010-12-10
Posts: 5
Kailynn 现在声名狼藉
Default

Out of the box you can change the meta description and keywords for content pages only (products, categories, brands, articles, ...). I.e. for those pages that contain information that people may search for in search engines. I believe that for other types of pages the meta tags are almost useless and give you nothing from the SEO perspective.

However, you can alter the tags by creating a module that overrides the \XLite\Controller\AController::getMetaDescription( ) and \XLite\Controller\AController::getKeywords() methods.
Reply With Quote
  #3   IP: 76.164.216.30
Old 2016-05-06, 10:32 PM
Kailynn Kailynn is offline
初级会员
 
Join Date: 2010-12-10
Posts: 5
Kailynn 现在声名狼藉
Default

For the contact us page you should create classes/XLite/Module/XC/CustomSkin/Controller/Customer/ContactUs.php with the following contents and then enable Custom Skin module (or redeploy the store if the module is enabled already):
Code:
 <?php

namespace XLite\Module\XC\CustomSkin\Controller\Customer;

/**
 * Decorated controller class.
 * 
 * @LC_Dependencies ("CDev\ContactUs")
 */
class ContactUs extends \XLite\Module\CDev\ContactUs\Controller\Customer\ContactUs implements \XLite\Base\IDecorator
{
    /**
     * Get meta description
     *
     * @return string
     */
    public function getMetaDescription()
    {
        return 'Your custom meta description for pages handled by this controller class';
    }

    /**
     * Get meta keywords
     *
     * @return string
     */
    public function getKeywords()
    {
        return 'Your custom meta keywords for pages handled by this controller class';
    }
}
For other pages you should create similar files, but with a different location/namespace/name of the class being extended. Also, you need the @LC_Dependencies only for controller classes that are added by modules (change it in accordance with the module name), for core classes skip it.
Reply With Quote
  #4   IP: 76.164.216.30
Old 2016-05-06, 10:36 PM
Bethel Park Bethel Park is offline
初级会员
 
Join Date: 2005-07-21
Posts: 2
Bethel Park 现在声名狼藉
Default

I have create ContactUs.php under classes/XLite/Module/XC/CustomSkin/Controller/Customer/
but did not find this module name under /admin.php?target=addons_list_installed
Reply With Quote
  #5   IP: 76.164.216.30
Old 2016-05-06, 10:41 PM
Kailynn Kailynn is offline
初级会员
 
Join Date: 2010-12-10
Posts: 5
Kailynn 现在声名狼藉
Default

Do you see in under /admin.php?target=addons_list_installed&substring=c ustom%20skin ?

If not, please check if there is the classes/XLite/Module/XC/CustomSkin/Main.php file.


also re-deploy your store via the admin area of your X-Cart, this is very important, after I re-deploy www.cheapeyeglasses.net, I got what I need.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 2 (0 members and 2 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Modify Zen Cart to Use External Images 上海公司注册 ZenCart 0 2012-06-21 11:56 AM
How to Install an Zen Cart Template topvip ZenCart 0 2009-08-23 05:35 PM
x-cart Template Editing Guide for 4.1.x topvip X-Cart 0 2009-04-15 11:42 PM
Do meta tags affect Adsense? sunshine Google Adsense 0 2006-12-11 09:39 AM
HTML文档中小meta的大作用 smiling 建站交流 0 2006-02-16 04:27 AM

Prescription-glasses.com offers prescription glasses online at discount prices.
All times are GMT +8. The time now is 10:56 AM.


Powered by vBulletin Version 3.8.7
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.