Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Static page simulation. Search engine improvements

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #31  
Old 02-13-2005, 01:59 PM
 
GM GM is offline
 

eXpert
  
Join Date: Mar 2004
Location: Canada
Posts: 293
 

Default

I forgot to mention... it will take about 6-8 months to see your site anywhere pleasing on google if you are in a highly competitive category. (google sandbox) I built a super seo mod that put me at the top of msn for a ton of gold jewelry and diamond keywords with the highest competition being 126,000,000 but google hasn't picked me up yet.
__________________
v. 4.0.14 (GM Style)
O.S. Linux
Build Your Own Diamond Ring
Reply With Quote
  #32  
Old 03-01-2005, 10:36 PM
 
andyng andyng is offline
 

Senior Member
  
Join Date: Mar 2004
Posts: 151
 

Default Static page simulation. Search engine improvements

Hi Ferrando,

I have tried your mod and it works great.

However, would you mind to made the listing mod sorted by ascending order?


Andy
X-cart V. 4.7.0
Reply With Quote
  #33  
Old 03-01-2005, 10:57 PM
 
andyng andyng is offline
 

Senior Member
  
Join Date: Mar 2004
Posts: 151
 

Default Static page simulation. Search engine improvements

Hi Ferrando,

I have made the change of the mod which can display the listing by ascending order.

Andy
Reply With Quote
  #34  
Old 03-03-2005, 12:45 PM
 
fernando fernando is offline
 

Member
  
Join Date: Oct 2004
Posts: 29
 

Default

For those asking for the mod to look integrated with x-cart look and feel, and sorted output, you can use the following code:

Replace SEO_listing.php with:

Code:
<?php require "./auth.php"; require $xcart_dir."/include/categories.php"; $qry = "SELECT * FROM " . $sql_tbl["products"] . " where forsale='Y' order by product"; $result = db_query($qry); $products = array(); while ($result_row = db_fetch_array($result)) { $products[] = $result_row; } $smarty->assign("main","SEO_listing"); $smarty->assign("products",$products); func_display("customer/home.tpl", $smarty); ?>

Open skin1/customer/home_main.tpl. Go to the very end and look for:

Code:
{else} {include file="common_templates.tpl"} {/if}

Before that, add:

Code:
{elseif $main eq "SEO_listing"} {include file="SEO_listing.tpl"}

Lastly, replace skin1/SEO_listing.tpl with:

Code:
{* Smarty Template by Fernando Borcel. MascotasMexico.com 2004/10/31 *} {capture name="productslist"} Enter the store {foreach from=$products item=v key=k} {$products[$k].product} {$products[$k].descr}</p> {/foreach} Enter the store {/capture} {include file="dialog.tpl" title="Products" content=$smarty.capture.productslist extra="width=100%"}

.htaccess should include the code: (remember to change /xcarthome with the web directory that your store is at, e.g. /xcart.

Options -Indexes

Code:
RewriteEngine on Options +FollowSymlinks RewriteBase / RewriteRule ^(.*)-pid-([0-9]+)\.html$ /xcarthome/product.php?productid=$2 [L] RewriteRule ^(.*)list.html$ /xcarthome/SEO_listing.php [L]

To invoke the script, call http://your.store.com/xcarthome/list.html

I didn't get around printing the categories too. Maybe I'll hack my own site map mod to handle some mod rewrite in the same manner as this products listing.
__________________
Fernando
Sorry, I\'m not using x-cart anymore, so I am unable to reply to enquiries about modules. Thank you.
Reply With Quote
  #35  
Old 03-03-2005, 06:56 PM
 
andyng andyng is offline
 

Senior Member
  
Join Date: Mar 2004
Posts: 151
 

Default Static page simulation. Search engine improvements

Hi fernando,

I have tried you new mod which works fine and wonderful.

Many thank for your effort and share with us.

Regards,

Andy
Reply With Quote
  #36  
Old 03-17-2005, 06:47 PM
 
moza moza is offline
 

Member
  
Join Date: Apr 2003
Location: Australia
Posts: 22
 

Default

I tried to get this code to working but everytime I tried I got error on this line:

Quote:
Originally Posted by fernando
while ($result_row = db_fetch_array($result)) {

The error message is like this:
Parse error: parse error, unexpected T_VARIABLE in /Applications/MAMP/htdocs/test_001/xcart_412/customer/listing.php on line 13

I have checked everything, and still get this error, I am testing with 4.012 and also I have tried with 3.7 and other versions and same result.

I put files in the same folder that you mentioned here in this page.
What do you think would be the cause of this error.

Regards,
Moza
__________________
x-cart 3.5
Reply With Quote
  #37  
Old 03-17-2005, 06:55 PM
 
hooter hooter is offline
 

X-Adept
  
Join Date: Dec 2004
Posts: 519
 

Default

Quote:
Originally Posted by moza
I tried to get this code to working but everytime I tried I got error on this line:

Quote:
Originally Posted by fernando
while ($result_row = db_fetch_array($result)) {

The error message is like this:
Parse error: parse error, unexpected T_VARIABLE in /Applications/MAMP/htdocs/test_001/xcart_412/customer/listing.php on line 13

Check for a missing close bracket } and/or one too many
__________________
Blog for X-Cart | Ebay Auction Manager
Reply With Quote
  #38  
Old 03-17-2005, 07:07 PM
 
fernando fernando is offline
 

Member
  
Join Date: Oct 2004
Posts: 29
 

Default

Quote:
Originally Posted by moza
The error message is like this:
Parse error: parse error, unexpected T_VARIABLE in /Applications/MAMP/htdocs/test_001/xcart_412/customer/listing.php on line 13

Hi, I would try and copy the code for listing.php from scratch, it seems that there might be some line(s) missing on the code you copied.
__________________
Fernando
Sorry, I\'m not using x-cart anymore, so I am unable to reply to enquiries about modules. Thank you.
Reply With Quote
  #39  
Old 03-17-2005, 07:16 PM
 
moza moza is offline
 

Member
  
Join Date: Apr 2003
Location: Australia
Posts: 22
 

Default

Thanks for prompt respond,

Quote:
Originally Posted by hooter
Check for a missing close bracket } and/or one too many

This is the code that I am using:

Code:
<?php /* Search Engine Enhancement by Fernando Borcel. MascotasMexico.com */ require "./auth.php"; $qry = "SELECT * FROM " . $sql_tbl["products"] . " where forsale='Y' order by add_date DESC"; $result = db_query($qry); $products = array(); while ($result_row = db_fetch_array($result)) { б═ $products[] = $result_row; } $smarty->assign("products",$products); $smarty->display("SEO_listing.tpl", $smarty); ?>
__________________
x-cart 3.5
Reply With Quote
  #40  
Old 03-17-2005, 07:22 PM
 
mrbiggles mrbiggles is offline
 

Senior Member
  
Join Date: Jan 2005
Location: Adelaide , South Australia
Posts: 107
 

Default

This is my code and it seems to work for me

Code:
<?php require "./auth.php"; require $xcart_dir."/include/categories.php"; $qry = "SELECT * FROM " . $sql_tbl["products"] . " where forsale='Y' order by product"; $result = db_query($qry); $products = array(); while ($result_row = db_fetch_array($result)) { $products[] = $result_row; } $smarty->assign("main","SEO_listing"); $smarty->assign("products",$products); func_display("customer/home.tpl", $smarty); ?>

Regards Adam
__________________
www.creydall.com
X-Cart version 4.0.11
PHP 4.3.9 MySQL 4.0.22
Apache/1.3.33
Perl 5.008004
Adam
Adelaide South Australia
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 12:17 PM.

   

 
X-Cart forums © 2001-2020