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)
-   -   Php Code tag for short description. (https://forum.x-cart.com/showthread.php?t=22334)

brgreene 06-07-2006 05:45 AM

Php Code tag for short description.
 
On my site, www.heartlandbraidedrugs.com the Short Description of a product is not visible. I use only the long description for instructions on ordering rugs. The way the x-cart uses the Long Description for the Meta Description cause me problems with search engines.

I have found this code from the product.php.

Code:

$main = "product";
$smarty->assign("main",$main);

if (!empty($product_info["productid"])) {
        $product_info["meta_descr"] = strip_tags($product_info["descr"]);
        $product_info["meta_keywords"] = strip_tags($product_info["product"])." ".preg_replace("/[^a-zA-Z0-9]/", " ", strip_tags($product_info["descr"]));
}


It appears $product_info["meta_descr"] = strip_tags($product_info["descr"]); controls the description. Does anyone know what I would use in ($product_info["HERE"]) to use the short description?

Any help would be greatly appreciated.

Jon 06-07-2006 08:07 AM

You should put your version in your signature.

I believe this is short description:
$product_info["descr"]);

This is long description:
$product_info["fulldescr"]);

brgreene 06-07-2006 11:10 AM

Here is my Meta.tpl. It is doing what I want but it is also including the Meta Description from the SEO Area. Any way to make the Products only have the short description as the Meta Description. I am using version 4.0.18.

Code:

{* $Id: meta.tpl,v 1.18.2.4 2004/12/23 12:50:34 svowl Exp $ *}
<META http-equiv="Content-Type" content="text/html; charset={$default_charset|default:"iso-8859-1"}">
{if $usertype eq "P" or $usertype eq "A"}
<META name="ROBOTS" content="NOINDEX">
<META name="ROBOTS" content="NOFOLLOW">
{else}
{assign var="_meta_descr" value=""}
{assign var="_meta_keywords" value=""}
{if $product.meta_descr ne "" and $config.SEO.include_meta_products eq "Y"}
{assign var="_meta_descr" value="`$product.meta_descr` "}
{assign var="_meta_keywords" value="`$product.meta_keywords` "}
{/if}
{if $current_category.meta_descr ne "" and $config.SEO.include_meta_categories eq "Y"}
{assign var="_meta_descr" value="$_meta_descr`$current_category.meta_descr` "}
{assign var="_meta_keywords" value="$_meta_keywords`$current_category.meta_keywords` "}
{/if}
{assign var="_meta_descr" value="$_meta_descr`$config.SEO.meta_descr`"}
{assign var="_meta_keywords" value="$_meta_keywords`$config.SEO.meta_keywords`"}
<META name="description" content="{$_meta_descr|truncate:"500":"...":false|replace:'"':"'"}">
<META name="keywords" content="{$_meta_keywords|truncate:"500":"":false|replace:'"':"'"}">
{/if}
{if $webmaster_mode eq "editor"}
{if ($usertype eq "P" or $usertype eq "A") and $current_language ne ""}
<SCRIPT type="text/javascript" language="JavaScript 1.2">var store_language = "{$current_language}"</SCRIPT>
{else}
<SCRIPT type="text/javascript" language="JavaScript 1.2">var store_language = "{$store_language}"</SCRIPT>
{/if}
<SCRIPT type="text/javascript" language="JavaScript 1.2">
var catalogs = new Object();
catalogs.admin = "{$catalogs.admin}";
catalogs.provider = "{$catalogs.provider}";
catalogs.customer = "{$catalogs.customer}";
catalogs.partner = "{$catalogs.partner}";
catalogs.images = "{$ImagesDir}";
catalogs.skin = "{$SkinDir}";
var lng_labels = new Array();
{foreach key=lbl_name item=lbl_val from=$webmaster_lng}
lng_labels['{$lbl_name}'] = '{$lbl_val}';
{/foreach}
var page_charset = "{$default_charset|default:"iso-8859-1"}";
</SCRIPT>
{if $user_agent eq "ns"}
<SCRIPT type="text/javascript" language="JavaScript 1.2" src="{$SkinDir}/editorns.js"></SCRIPT>
{else}
<SCRIPT type="text/javascript" language="JavaScript 1.2" src="{$SkinDir}/editor.js"></SCRIPT>
{/if}
{/if}


brgreene 06-07-2006 11:31 AM

Working...on it
 
If I comment out the following line.
Code:

{assign var="_meta_descr" value="$_meta_descr`$config.SEO.meta_descr`"}

I get the short description text and the category meta description text on my products but none of my other pages have a meta description.

I would like to have the

1. SEO Meta Description on my information pages.

2. Category Meta Description on Categorie Pages

3. Product Short Description on just Product Pages.

I hope this explains more what I am trying to do.


All times are GMT -8. The time now is 03:02 AM.

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