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)
-   -   XC SEO v1.1.0 Released (https://forum.x-cart.com/showthread.php?t=25297)

Scott DeToffol 10-30-2006 11:53 AM

Re: XC SEO v1.1.0 Released
 
intel, I'm having a different problem with Froogle export now. Per you suggestion, I replaced my Froogle.php with a clean one from 4.0.19 and then inserted your udpated code. The export file truncates the link to my store root. If I remove the XC_SEO code from froogle.php it exports the link correctly. I think I remember there being a fix to this somewhere, but I can't remember or find it.

BTW, my froogle problem with invalid characters might be a Google Base issue with the bulk upload feature.

Scott

ezi designs 10-30-2006 03:42 PM

XC SEO v1.1.0 Released
 
I know i sound thich but can you explain what you mean by;

you need to open the following files for SQL commands:
sql/xcseo.sql
sql/xcseo_lng_US.sql


Real sorry for asking again intel

Thanks

Richard

ShishaPipeUK 10-30-2006 03:55 PM

Re: XC SEO v1.1.0 Released
 
You need to open the file xcseo.sql and copy it to your admin patch section, and then apply the patch.

So for the first one xcseo.sql, select the sql patch text inside the file (by highlighting all the text, and pressing "Ctrl + C") and then log into your admin section, select the "Patch/Upgrade" under the Administration section, then look for the Apply SQL patch box which is the last box, and in the SQL query(ies): box paste the code inside it (by pressing "Ctrl + V") from the file xcseo.sql.

Once this is done then click on the Apply button to apply this to your MySql database.

Hope the above makes sense.

intel352 10-30-2006 04:56 PM

Re: XC SEO v1.1.0 Released
 
Thanks for taking the time to explain that to him Shisha, I didn't have any time at work today :-\

ezi: you can apply a SQL patch by going to the admin patch area of X-Cart, scrolling down to the SQL area. there are 2 options, 1 is to upload a file from your harddrive, the other is to paste in the SQL commands directly. you can do either. you have to upload (or paste the contents) of both:
sql/xcseo.sql
sql/xcseo_lng_US.sql

into the X-Cart patch admin.

Hopefully the following link from the X-Cart manual will explain this better.
http://x-cart.com/xcart_manual/online_4x/applying_sql_patches.htm

intel352 10-30-2006 04:58 PM

Re: XC SEO v1.1.0 Released
 
Quote:

Originally Posted by Scott DeToffol
intel, I'm having a different problem with Froogle export now. Per you suggestion, I replaced my Froogle.php with a clean one from 4.0.19 and then inserted your udpated code. The export file truncates the link to my store root. If I remove the XC_SEO code from froogle.php it exports the link correctly. I think I remember there being a fix to this somewhere, but I can't remember or find it.

BTW, my froogle problem with invalid characters might be a Google Base issue with the bulk upload feature.

Scott


Scott, if you'd like, I can take a look at your Froogle file for you. PM me the details to your installation, I'll check it tonight or tomorrow. Otherwise, I'd suggest trying the process with a fresh file one more time, paying careful attention to what you copy/paste/insert.

ezi designs 10-31-2006 02:11 AM

Re: XC SEO v1.1.0 Released
 
Hi Guys

Thanks for all your help and i am getting there, well im there all bar one one error

Parse error: syntax error, unexpected T_IF in /home/ezidesig/public_html/storedzine/include/get_language.php on line 206

Here is what the code looks like in that folder;

#
# $Id: get_language.php,v 1.70.2.3 2006/08/07 07:18:11 max Exp $
#

if ( !defined('XCART_SESSION_START') ) { header("Location: ../"); die("Access denied"); }
define("GET_LANGUAGE", 1);
x_session_register("old_lng");
if (!empty($edit_lng) && !empty($HTTP_GET_VARS['old_lng'])) {
$asl = $edit_lng;
$HTTP_POST_VARS['asl'] = $asl;
$old_lng = $HTTP_GET_VARS['old_lng'];
$QUERY_STRING = func_qs_remove($QUERY_STRING,"edit_lng");
$QUERY_STRING = func_qs_remove($QUERY_STRING,"old_lng");
$HTTP_REFERER = preg_replace("/[&\?]edit_lng=\w{2}/S", "", $HTTP_REFERER);
$HTTP_REFERER = preg_replace("/[&\?]old_lng=\w{2}/S", "", $HTTP_REFERER);
}

if (!empty($old_lng) && !defined("IS_MULTILANGUAGE")) {
if($config['Appearance']['restore_language_interface'] == 'Y') {
$asl = $old_lng;
$HTTP_POST_VARS['asl'] = $asl;
$HTTP_REFERER = $PHP_SELF."?".$QUERY_STRING;
}
$old_lng = "";
}

$e_langs = func_data_cache_get("charsets");
$d_langs = explode ("|", $config["disabled_languages"]);
if ($d_langs) {
$d_langs = func_array_map("trim", $d_langs);
foreach ($d_langs as $v) {
if (isset($e_langs[$v])) {
unset($e_langs[$v]);
}
}
}

if (!isset($e_langs[$config["default_customer_language"]]) && !empty($e_langs) && is_array($e_langs))
$config["default_customer_language"] = key($e_langs);
if (!isset($e_langs[$config["default_admin_language"]]) && !empty($e_langs) && is_array($e_langs))
$config["default_admin_language"] = key($e_langs);

# Define redirect URL
if ($is_https_redirect == 'Y') {

# Redirect from HTTP
$l_redirect = func_qs_remove($PHP_SELF."?".$QUERY_STRING, "is_https_redirect", "sl", $XCART_SESSION_NAME);

} elseif (empty($HTTP_REFERER) || strstr($HTTP_REFERER, "error=disabled_cookies")) {
# First request or redirect from Disabled cookies error page
$l_redirect = func_qs_remove($PHP_SELF."?".$QUERY_STRING, "sl", $XCART_SESSION_NAME);

} else {
$l_redirect = func_qs_remove($HTTP_REFERER, "sl", $XCART_SESSION_NAME);
}

if ($smarty->webmaster_mode || $smarty->debugging)
$predefined_lng_variables = array("lbl_xcart_debugging_console", "lbl_included_templates_config_files");
else
$predefined_lng_variables = array();

if ($login) unset($store_language);
if (!empty($HTTP_GET_VARS["sl"]))
$store_language = $HTTP_GET_VARS["sl"];

$shop_language = '';
if (empty($current_area) || @$current_area == "C" || @$current_area == "B") {
if (empty($store_language) && !empty($login)) {
$store_language = func_query_first_cell ("SELECT $sql_tbl[customers].language FROM $sql_tbl[customers], $sql_tbl[languages] WHERE $sql_tbl[customers].login='$login' AND $sql_tbl[customers].language = $sql_tbl[languages].code LIMIT 1");
}

if (!empty($store_language)) {
if (!isset($e_langs[$store_language])) {
$store_language = "";
}
}

if (empty($store_language))
$store_language = $config["default_customer_language"];

if (!isset($e_langs[$store_language])) {
if (!isset($e_langs[$config["default_customer_language"]]) && !empty($e_langs) && is_array($e_langs)) {
$store_language = key($e_langs);
} else {
$store_language = $config["default_customer_language"];
}
}

$shop_language = $store_language;
}
else {
x_session_register("current_language");
if (@$HTTP_POST_VARS["asl"] && $login) {
$res = func_query_first ("SELECT charset FROM $sql_tbl[countries] WHERE code='".$HTTP_POST_VARS["asl"]."'");
if ($res) {
$current_language = $HTTP_POST_VARS["asl"];
}
func_header_location($l_redirect);
}

if (!isset($current_language) || empty($current_language))
$current_language = $config["default_admin_language"];

if (!isset($e_langs[$current_language])) {
if (!isset($e_langs[$config["default_admin_language"]])) {
$current_language = key($e_langs);
reset($e_langs);
} else {
$current_language = $config["default_admin_language"];
}
}

$smarty->assign ('current_language', $current_language);
$shop_language = $current_language;
}
$smarty->assign ('default_charset', $e_langs[$shop_language]);

x_session_register("editor_mode");
if ($login)
db_query ("UPDATE $sql_tbl[customers] SET language='$shop_language' WHERE login='$login'");

if (@$current_area == "C" || @$current_area == "B") {
#
# Set cookies
#
if ($store_language != @$HTTP_COOKIE_VARS["store_language"] && !defined('NOCOOKIE')) {
setcookie ("store_language", "", time()-31536000);
setcookie ("store_language", $store_language, time()+31536000); # for one year
if ($xcart_http_host != $xcart_https_host) {
#
# Set cookies for HTTPS host
#
setcookie ("store_language", "", time()-31536000, "/", $xcart_https_host, 1);
setcookie ("store_language", $store_language, time()+31536000, "/", $xcart_https_host, 1); # for one year
}
}
}

$all_languages = func_data_cache_get("languages", array($shop_language));
if (empty($all_languages)) {
$def_language = ($current_area == 'C' ? $config["default_customer_language"] : $config["default_admin_language"]);
$all_languages = func_data_cache_get("languages", array($def_language));
if (empty($all_languages)) {
$all_languages = func_data_cache_get("languages", array(key($e_langs)));
reset($e_langs);
}
}

$n_langs = array ();
if ($all_languages) {
$avail_languages = $all_languages;
foreach ($all_languages as $value) {
if (!in_array($value["code"], $d_langs))
$n_langs [] = $value;
}
}

if (
($current_area == "C" || $current_area == "B") &&
!empty($HTTP_GET_VARS["sl"]) &&
!defined('IS_ROBOT') &&
################################################## ##########
# X-CART-SEO Mod ::
http://code.google.com/p/x-cart-seo/
################################################## ##########
if (!empty($active_modules["XC_SEO"])) {
func_header_location($l_redirect);
}else{
if (!preg_match('!(\.htm(l)?|/$)!',$_tmp["path"])) {
func_header_location($l_redirect);
}
}
# End SEO {
func_header_location($l_redirect);

$all_languages = $n_langs;
$smarty->assign ("all_languages", $all_languages);
$smarty->assign ("store_language", @$store_language);
$smarty->assign ("shop_language", @$shop_language);
$smarty->assign ("all_languages_cnt", sizeof($all_languages));

$config["Company"]["location_country_name"] = func_get_country($config["Company"]["location_country"]);
$config["Company"]["location_state_name"] = func_get_state($config["Company"]["location_state"], $config["Company"]["location_country"]);
$smarty->assign("config",$config);
$mail_smarty->assign("config",$config);

if (!empty($config['r2l_languages'][$shop_language]))
$smarty->assign('reading_direction_tag', ' dir="RTL"');
else
$smarty->assign('reading_direction_tag', '');

?>

intel352 10-31-2006 06:03 PM

Re: XC SEO v1.1.0 Released
 
ezi, it's hard to read your code as posted, please post it within CODE blocks

additionally, a T_IF means you modified the code incorrectly. best troubleshooting method is to replace your get_language file with the original file, and try applying the modifications from scratch

consolep 10-31-2006 09:24 PM

Re: XC SEO v1.1.0 Released
 
I have to say this again but WOW! This software is great, My customers seem to enjoy the easy to read urls more then the session id's lol. Can't wait until the category to folder features are integrated :)

MyCleaningProducts 11-02-2006 08:59 PM

Re: XC SEO v1.1.0 Released
 
I am not sure why but my site is not displayiing the pages, it show a page not found. I am not sure if my Mod Rewrite is correct.

Below is the code, Is my server not rewriting the URLs is that why I can get my to site to show product pages. Every time I hit a category or product the page shows not found, ANY Assistance would be appreciated..

Thanks

#####
# The following rules should be added
# to the TOP of your existing .htaccess file
# to prevent malicious users/bots from accessing
# x-cart files that aren't meant to be public.
#####

# block all smarty templates (no reason to have these exposed)
RedirectMatch gone ^/.*\.tpl$

# block all .log (log files), .sql (sql dump/export) and .conf (config files) files
# in case some day these files move to another directory
RedirectMatch gone ^.*\.(sql|log|conf)$

# block access to the 'Smarty-*' directory
RedirectMatch gone ^.*Smarty.*$

# block common X-Cart files that could reveal
# that you have X-Cart installed
RedirectMatch gone VERSION.*
RedirectMatch gone COPYRIGHT.*
RedirectMatch gone INSTALL.*
RedirectMatch gone NEW.*
RedirectMatch gone README.*
RedirectMatch gone UPGRADE.*

# block access to /upgrade
Redirect gone /upgrade

# block access to /skin1_original
Redirect gone /skin1_original

# block access to the /sql directory
Redirect gone /sql

# block access to the /shipping directory
Redirect gone /shipping

# block access to the pgp directories
Redirect gone /.pgp
Redirect gone /.pgp.def

# block access to the pgp directories
Redirect gone /tmp
Redirect gone /var

# REWRITE RULES
Options +SymlinksIfOwnerMatch -Indexes

RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_HOST} !^www\.mycleaningproducts\.com [NC]
RewriteRule ^(.*)$ http://www.mycleaningproducts.com/$1 [R=301,L]


# -FrontPage-

IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*

<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>

intel352 11-03-2006 03:02 AM

Re: XC SEO v1.1.0 Released
 
there were 2 files included in the XC SEO download. 1 is ".htaccess", the other is "secure.htaccess". It appears you copied the text from the "secure" file, but neglected the text from the regular htaccess. The regular htaccess has what you need


All times are GMT -8. The time now is 03:08 PM.

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