X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Funkydunk's COOL mod for total meta tag control (https://forum.x-cart.com/showthread.php?t=2854)

Dlee 10-27-2003 12:00 AM

Quote:

Originally Posted by funkydunk
This must be because there is a return or new line in the category_modify.tpl around the description field.

Take the extra space around the value of that field out and it will stop doing this.

hth



Found that little sucker at the end of line 34 works properly now.


<textarea cols=65 rows=15 name=description>


Thanks for the guided tour.


dlee

mydivascloset 11-03-2003 05:38 PM

This is a great mod! Thanks for helping us out!

I have a suggestion/request. :)

Is there a way to have the products within the category use the same meta title, descriptions and keywords as the category that it resides in?

Thank you!

wlekoh 11-03-2003 11:09 PM

First of all, awesome work Funkydunk and thanks for the generosity by posting the code up. Thank you!

I got a question that maybe funkydunk or Dlee can answer...I'm haivng that problem where it inserts a space/line break in the description box when I go to edit a category.

Now Funkydunk said to edit the category_modify.tpl and can locate the file...but what is the exact change I have to make?? I'm no programmer (as you can tell)..how do I remove the line break?

Thanks in advance

Dlee 11-04-2003 09:23 AM

wlekoh,

If you can locate the file you are almost done. Open this file in a text editor like notepad. I use TextPad and I recommend it, it is very easy to use. Look for the line or do a search in the document via your text editor for this line of code.

<textarea cols=65 rows=15 name=description>

at the end of this line is where the problem is. Their is an extra space there and needs to be deleted. Don't let the line wrap, just delete the space.

Here is the corrected version of category_modify.tpl

Code:

{* $Id: category_modify.tpl,v 1.20 2002/11/10 09:26:46 ndv Exp $ *}
{include file="location.tpl" last_location="Add/Modify category"}
{capture name=dialog}
<table border=0>
<form name="addform" action="category_modify.php?mode={$smarty.get.mode}" method=post enctype="multipart/form-data">
<tr>
<td>[img]../icon.php?categoryid={$cat}&rand={$rand}[/img]</td>
<td colspan=2></td>
</tr>
<tr>
<td height="10" class=FormButton nowrap>Icon</td>
<td width="10" height="10"></td>
<td><input type="file" name="userfile"></td>
</tr>
<TR>
<TD height="10" class=FormButton nowrap>Order by</TD>
<TD width="10" height="10"></TD>
<TD height="10"><INPUT type=text name="order_by" size=4 value="{if $category_error ne ""}{$smarty.post.order_by}{elseif $smarty.get.mode ne "add"}{$current_category.order_by}{/if}">
</TR>
<tr>
<td height="10" class=FormButton nowrap>Category</td>
<td width="10" height="10"><font class=CustomerMessage>*</font></td>
<td height="10">
<input type="text" name="category_name" size="30" value="{if $category_error ne ""}{$smarty.post.category_name|escape:"htmlall"}{elseif $smarty.get.mode ne "add"}{$current_category.category|escape:"htmlall"}{/if}">
{if $category_error ne ""}
<font color=red><< Wrong value</font>
{/if}
</td>
</tr>
<tr>
<td height="10" class=FormButton nowrap valign=top>Description</td>
<td width="10" height="10"><font class=CustomerMessage></font></td>
<td height="10">
<textarea cols=65 rows=15 name=description>
{if $category_error ne ""}{$smarty.post.description|escape:"htmlall"}{elseif $smarty.get.mode ne "add"}{$current_category.description|escape:"htmlall"}{/if}
</textarea>
</td>
</tr>

{* funkydunk metamod 2003 *}
<tr>
<td height=10 class=FormButton nowrap>Page Title</td>
<td width="10" height="10"><font class=FormButtonOrange></font></td>
<td height=10>
<input type=text name=page_title size="30" value="{if $category_error ne ""}{$smarty.post.page_title|escape:"htmlall"}{elseif $smarty.get.mode ne "add"}{$current_category.page_title|escape:"htmlall"}{/if}">
</td>
</tr>

<tr>
<td height=10 class=FormButton nowrap>Meta Description</td>
<td width="10" height="10"><font class=FormButtonOrange></font></td>
<td height=10>
<input type=text name=meta_description size="30" value="{if $category_error ne ""}{$smarty.post.meta_description|escape:"htmlall"}{elseif $smarty.get.mode ne "add"}{$current_category.meta_description|escape:"htmlall"}{/if}">
</td>
</tr>
{* end of funkydunk metamod 2003 *}

<tr>
{* funkydunk metamod 2003 *}
<td height=10 class=FormButton nowrap>Meta Keywords</td>
{* end of funkydunk metamod 2003 *}
<td width="10" height="10"><font class=FormButtonOrange></font></td>
<td height=10>
<input type=text name=meta_tags size="30" value="{if $category_error ne ""}{$smarty.post.meta_tags|escape:"htmlall"}{elseif $smarty.get.mode ne "add"}{$current_category.meta_tags|escape:"htmlall"}{/if}">
</td>
</tr>
<TR>
<TD height=10 class=FormButton nowrap>Membership</TD>
<TD width=10 height=10><FONT class=FormButtonOrange></FONT></TD>
<TD height=10>
<SELECT name=cat_membership>
<OPTION value=""{if $current_category.membership eq ""} selected{/if}>All</OPTION>
{section name=mi loop=$membership_levels}
{if $membership_levels[mi].usertype eq "C"}
<OPTION value="{$membership_levels[mi].membership}"{if $current_category.membership eq $membership_levels[mi].membership} selected{/if}>{$membership_levels[mi].membership}</OPTION>
{/if}
{/section}
</SELECT>
</TD>
</TR>
<tr>
<td height=10 class=FormButton nowrap>Availability</td>
<td width=10 height=10><font class=CustomerMessage></font></td>
<td height="10">
<select name=avail>
<option value='Y' {if ($current_category.avail eq 'Y')} selected {/if}>Enabled</option>
<option value='N' {if ($current_category.avail eq 'N')} selected {/if}>Disabled</option>
</select>
</td>
</tr>
<tr>
<td width="78" class=FormButton></td>
<td width="10"></td>
<td width="282">

 
<input type=submit value="Submit">
</td>
</tr>
<input type=hidden name=cat value={$cat}>
</form>
</table>
{/capture}
{include file="dialog.tpl" title="Add/Modify category" content=$smarty.capture.dialog extra="width=100%"}


That should do it. Just paste this code in to category_modify.tpl and your done.

dlee

wlekoh 11-04-2003 01:58 PM

Thanks Dlee, that fixed it up sure enough! :D
Has anyone had any problems using webmaster mode after this mod was installed? I can't seem to use that feature of X-cart anymore after installing this. :cry:

censat 11-17-2003 11:06 AM

SQL Patch
 
When I try to apply the patch...I get the following error

INVALID SQL: 1062 : Duplicate entry 'meta_title' for key 1
SQL QUERY FAILURE: INSERT INTO xcart_config VALUES ('meta_title', 'Meta Title', '', 'Company', 600, 'text')

Quote:


INSERT INTO xcart_config VALUES ('meta_title', 'Meta Title', '', 'Company', 600, 'text');
INSERT INTO xcart_config VALUES ('meta_description', 'Meta Description', 'DSS Remotes, DSS Accessories, DSS Parts, Pepper Spray, Personal Protection,Security Cameras,Surveillance Cameras, Surveillance Systems, PlayStation Accessories, PlayStation2 Accessories, Game Cube Accessories, XBOT Accessories,Stun Guns, Tasers, Metal Detectors.', 'Company', 601, 'text');
INSERT INTO xcart_config VALUES ('meta_keywords', 'Meta Keywords', 'security,surveillance,personal protection,dss,cband,game accessories,nintendo,playstation,dreamcast,gameboy ,pepper spray,mace,tasers,stun gun,car security,accessories,hidden cameras,remote surveillance,remotes,replacement remotes,remote controls,cell phone,cellphone,cellphone accessories,STUN GUNS,stun gun,TASERS,tasers,PEPPER SPRAY,pepper spray,pepper foam,MACE,PERSONAL ALARMS,CHILD PROTECTION,self defense', 'Company', 602, 'text');

ALTER TABLE `xcart_categories` ADD `page_title` VARCHAR( 255 ) AFTER `description` ;
ALTER TABLE `xcart_categories` ADD `meta_description` VARCHAR( 255 ) AFTER `page_title` ;


Using MSQL VER 4.0.16

Any Ideas?





Thank's
Censat

wlekoh 11-22-2003 02:03 AM

I Think it means you have tried or have successfully ran and patched the SQL database using that query. Try going to general settings then "company setting" and have a look if there's fields there for meta tags.

wlekoh 11-22-2003 02:07 AM

Meta Mod installed..category icons not working
 
Did you guys realise that by installing Funkydunk's meta mod it creates some problems with the category icons?? You can't add any category icons whatsoever...

Anyone figured out a soltion around this problem??

curpier 11-23-2003 08:04 AM

Quote:

Did you guys realise that by installing Funkydunk's meta mod it creates some problems with the category icons?? You can't add any category icons whatsoever...

Anyone figured out a soltion around this problem??

Same problem on my site. I cannot add any subcategory Icons anymore :( .

curpier 11-23-2003 09:26 AM

Figured it out ... see page 2

wlekoh 11-23-2003 02:00 PM

But those modifications are for 3.4.4 and I am running 3.4.8
Will it still work ok?

curpier 11-23-2003 05:41 PM

Works fine. Use the category_modify.php for 3.4.8 (posted by funkydunk page 3) Use the category_modify.tpl listed on Page 2 (posted by eleven). Everything else is the same as listed on page 1. I also used the updated meta.tpl and the new bit in home.tpl to transfer metas to product pages.

There seems to be a space that needs to be deleted in the category_modify.tpl ... still searching for it.

elmtronics 11-25-2003 11:44 AM

Has anyone tried this mod on 3.5 yet?
If so how were your results

krishmandal 11-25-2003 03:23 PM

Took a little reading and re-reading, but I got it done.... WAY COOL MOD!!! :D

FunkyDunk, gotta love that guy! :wink:

wlekoh 11-26-2003 10:10 PM

Hmm I still seem to have problems with the category icons not showing up at all after installing this mod on x-cart 3.4.8. I followed all the instructions as mentioned but still no go...anyone else having this problem?

krishmandal 12-04-2003 07:14 AM

Wlekoh--

Sorry, I'd like to help, but I'm not using category icons. Perhaps I should try it, but I'm still trying to get all the little things that don't work for me fixed up before launch.

ifalu 12-17-2003 07:20 AM

Does this work with 3.50?
 
I will like to know

dbr1066 01-02-2004 11:04 AM

I tried this mod on v3.5.1 and now when I try to Modify a category I get an error message "Can't to find template engine!" :(

Looking at the category_modify.php file for v3.5.1, it looks like there are some major differences from 3.4.8 and earlier. Does anyone have any ideas on what needs to be done to get this mod to work with 3.5.1?

adpboss 01-02-2004 11:07 AM

Search for this, i know that Boomer detailed informaton on this board about what is required to get these mods to work in 3.5.x.

dbr1066 01-02-2004 11:36 AM

Thanks adpboss. I found the post, where Boomer suggests replacing all include .. strings with $xcart_dir."/ . I ammended the category_modify.php file as Boomer suggested. Got the same error message. Then I saw that the lines

require "../smarty.php";
require "../config.php";
require "./auth.php";
require "../include/security.php";

all used the same relative linking format, so I replaced them with the $xcart_dir."/ too. There were a couple of other instances in that file of "replace .." which I changed also. Now I just get a completely blank page when trying to modify categories. I checked all the other template files for include .. strings, but didn't find anything.

Unless I missed something obvious (I'll bet I did!) this mod doesn't seem to work on 3.5.1

Can anyone offer any insight?

dealsondeals 01-02-2004 11:38 AM

dbr1066,

In order to not receive the "Can't find to template engine" message, please locate and change the following in your catageory_modify.php:

Change:

Quote:

require "../smarty.php";
require "../config.php";
require "./auth.php";
require "../include/security.php";


to ....

Quote:

require "./auth.php";
require $xcart_dir."/include/security.php";



HTH,

Glen

miss_beth 02-23-2004 05:35 AM

Anyone verified whether this works/doesn't work on the newest versions?

~Beth

funkydunk 02-24-2004 01:58 AM

Glen's change above will do the trick and make it work on 3.5.x

:)

B00MER 02-24-2004 08:24 PM

As much as I love top.inc.php, it tends to reak havoc on old mods working on 3.5.x X-carts. #-o

turtle2 03-10-2004 08:16 AM

Re: Funkydunk, any reason why my title is sticking to the
 
Quote:

Originally Posted by jfinn98
Funkydunk, thanks for offering the mods.

I had no problems inserting the codes and seeing what it does.
However when making category modifications I am seeing one there.

when I add title metas etc. then hit update, everything disapears. seems like it will not take the update.


next is:

when I go into company options and make changes to comapny title, meta keywords. Seems like this does update.

however, when I create my catalog (dump the old) and take a url to my browser I am only seeing the category name show up in the TITLE.

this is one of the most important things so I hope there is a simple way to fix or perhaps a small detail I have missed.

my cart version is:

X-Cart version 3.4.3
PHP 4.2.2

John Finney


I had the same problem wtin 3.4.4. The SQL Patch failed and continued to do so on additional attempts. Made the changes to SQL using PHP admin. It was quite easy to do.

The rest of the Mod has worked quite well.
Brian

elmtronics 03-10-2004 05:19 PM

Quote:

Originally Posted by B00MER
As much as I love top.inc.php, it tends to reak havoc on old mods working on 3.5.x X-carts. #-o


Boomer could you explain what you mean by this? I'm haveing a hell of a time getting any mods to work in 3.5.4

B00MER 03-11-2004 07:04 PM

Dealsondeals, post about "can't to find template engine" is the most relative to 3.4.x mods not working in 3.5.x.


All times are GMT -8. The time now is 04:51 PM.

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