| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Copying title to meta | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
Copying title to meta
can anyone write me a SQL code that copies my product name into the title tag, meta keywords and meta description boxes so i dont have to go through 2000 product pages? I cant seem to find the tables they are stored in.
__________________
4.7.x xcart store Business 5.4xx |
|||||||
#2
|
|||||||||
|
|||||||||
Re: Copying title to meta
Off the top of my head (untested), how about something like this:
UPDATE: This did not work Code:
|
|||||||||
#3
|
|||||||
|
|||||||
Re: Copying title to meta
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(title_tag, meta_keywords, meta_description) = (
SELECT product, product, pro' at line 2
__________________
4.7.x xcart store Business 5.4xx |
|||||||
#4
|
|||||||||
|
|||||||||
Re: Copying title to meta
Maybe something like this instead (untested):
UPDATE: This did not work (probably would for MSSQL) Code:
|
|||||||||
#5
|
|||||||||
|
|||||||||
Re: Copying title to meta
In 4.6.x product name is NOT in products table so this will not work. Same for product's meta tags
They are all in product XX table - XX being language
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
#6
|
|||||||||
|
|||||||||
Re: Copying title to meta
What won't work?
|
|||||||||
#7
|
|||||||||
|
|||||||||
Re: Copying title to meta
The query won't work the way it is.
This UPDATE xcart_products, xcart_products_lng_en SET xcart_products.title_tag = xcart_products_lng_en.product, xcart_products.meta_keywords = xcart_products_lng_en.product, xcart_products.meta_description = xcart_products_lng_en.product WHERE xcart_products.productid = xcart_products_lng_en.productid; But make sure you backup first
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
#8
|
|||||||||
|
|||||||||
Re: Copying title to meta
Thanks for clarifying. However, the query did not fail because of the location of the product name. Your implicit JOIN is interesting but not clear. I prefer this:
Code:
|
|||||||||
#9
|
|||||||||
|
|||||||||
Re: Copying title to meta
Either way, as long as it works...
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
|
|||
X-Cart forums © 2001-2020
|