PDA

View Full Version : Category


jburgess
29-03-07, 22:38
I have a site specialising in toys, I would like the index page to default to the toy category (187). Any idea where the parameter is?

Confuscius
29-03-07, 23:42
Take a look in index.php and uncomment and change as follows:

from: #$_GET['c']= 535;
to : $_GET['c'] = 187;

This will change the Category Menu but you will still be able to access all parts via the drop down menu used as part of the search function.

Hope this helps.

Paul

jburgess
30-03-07, 19:14
Thanks, that worked.

trading365.co.uk
31-01-08, 19:23
I'd like my new site (www.aspenit.co.uk/shop (http://www.aspenit.co.uk/shop)) to start in the COMPUTERS & SOFTWARE category, I have updated my index.php file (see below) but it's not working...

Can anyone shed any light please ?

------------

<?php
/**
*
* ShopWindow Toolset
*
* Copyright (C) 2007 Digital Window Ltd.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/


require_once('global.inc.php');

include_once('status.php'); // detect any basic setup errors

// Force index to start from a specific category$_GET['c']=61;


require_once(HOME_PATH.DIRECTORY_SEPARATOR.'includ es'.DIRECTORY_SEPARATOR.'classes'.DIRECTORY_SEPARA TOR.'class.page_index.php');

require_once(HOME_PATH.DIRECTORY_SEPARATOR.'includ es'.DIRECTORY_SEPARATOR.'classes'.DIRECTORY_SEPARA TOR.'class.smarty_sw.php');


$oPage = new pageIndex();

$oSmarty= new Smarty_SW();


include_once(HOME_PATH.DIRECTORY_SEPARATOR.'includ es'.DIRECTORY_SEPARATOR.'elements'.DIRECTORY_SEPAR ATOR.'search_box.php');

include_once(HOME_PATH.DIRECTORY_SEPARATOR.'includ es'.DIRECTORY_SEPARATOR.'elements'.DIRECTORY_SEPAR ATOR.'hot_picks.php');

include_once(HOME_PATH.DIRECTORY_SEPARATOR.'includ es'.DIRECTORY_SEPARATOR.'elements'.DIRECTORY_SEPAR ATOR.'category_tree.php');


$oSmarty->display('index.tpl');

?>

Confuscius
31-01-08, 21:49
Hi

The // is a comment line!

Change to:
//==================================
// Force index to start from a specific category
//==================================
$_GET['c']=61;
//==================================

Add comment lines to your heart's content!

Paul

trading365.co.uk
01-02-08, 10:46
Cheers Paul - Many thanks

I'm a newbie so I'm still getting to grips with this, looks pretty impressive though. I just need to work out how to integrate CJ.com eBay items and Amazon items within my search results, and also Google AdSense items on the right hand side of the screen...

: )

amcho
01-02-08, 15:01
Google AdSense is easy:

in /templates/template_1/elements
you can add your adsense code to any of the .tpl files,
but the easiest to start with would be
page_footer.tpl
where you can put your google adsense code at the bottom of the page
as usual make a copy of the file before playing!

trading365.co.uk
01-02-08, 16:00
Many thanks Amcho !

Could you advise how I might align the Adsense ads on the right hand side of the screen running vertically ?

Thanks

Steve

amcho
04-02-08, 13:07
This may not be the best way to do it - but it worked for me.
I put the google adsense code into a div and positioned it absolutly at the top right hand corner of the page, this had the effect of overwriting/obscuring the search box and some of the products - so I then had to fiddle with the css to make the search box narrower. If you want a longer google ad words strip you will also need to fiddle with the width of the product display.

<div style="position:absolute;top:1px;right:1px;margin-left:20px;background-color: white;">
<script type="text/javascript"><!--
google_ad_client = "pub-4520697099658717";
//200x200, created 12/12/07
google_ad_slot = "3530120696";
google_ad_width = 200;
google_ad_height = 200;
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>

You can see this in action at
http://postal-flowers.com
where both the search box and the product has been limited to (I think) 50% width
and if you look at
http://amcho.co.uk/aw-shop
you will see that I still haven't changed the hot picks width so you get the bottom of the google adwords being obscured