Kryptronic Software Support Forum

You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.

#1 01-23-2009 12:01:07

jherr
Member
Registered: 09-12-2008
Posts: 26

Online Store Menu

Hi, I was wondering if it is possible to move the Terms of Use and the Privacy Information from the Main Menu to the Online Store Menu.

Thanks,
John

Offline

 

#2 01-23-2009 15:48:50

dh783
Member
From: Avondale, Arizona
Registered: 04-06-2005
Posts: 6233
Website

Re: Online Store Menu

You will not be able to do this unless you make a few mods to the code.

John

Offline

 

#3 01-24-2009 15:19:11

jherr
Member
Registered: 09-12-2008
Posts: 26

Re: Online Store Menu

Is there any documentation available that would show me how to make this modification? Or is this something that you would not advise a beginner to try?

Offline

 

#4 01-24-2009 16:51:38

dh783
Member
From: Avondale, Arizona
Registered: 04-06-2005
Posts: 6233
Website

Re: Online Store Menu

There is no documentation on this and has mods go it is quite easy, what it would require is for you to create a new column in the ccp0_storemenu (gbu0_storemenu for UK versions). Do this by going to Raw Database Admin and click on "Maintain" for the database then click on "Add Column: Add a new column to this database table." link and enter the information as fellows:

Column Name             = ref
Display Name             = Item Reference (or anything you like)
Column Type              = Text (VARCHAR)
Column Numeric         = 255
Not Null                      = 0
Column Section Name = Item Reference (or what ever you have in the display name)
Column Description     = (any thing you like)

Once you have created the new column for that database you can create a new menu item that will show up in the Online Store menu by selecting "Browse" and either clone an existing one or by clicking on the "Insert: Add a new ro to this database table" link and enter the information as fellows:

id               = (just give it a unique id or one that is not already in the list for this database)
name         = (what you want displayed in the menu)
namespace = display (since you are wanting the Terms of Use in this case)
menuorder = (where you want it to be displayed in the menu list, if this number is the same as one that is already in the menu then it will be sorted alphabetically)
menudisp   = 1
ref             = termsofuse

Now that this is done the fun stuff starts, you will need to make an edit to you private_dir/apps/ccp0/ccp/ext/femenus.php (private_dir/apps/gbu0/gbu/ext/femenus.php for UK version) in function menustore where you will need to find this code:

Code:

$sql  = "SELECT name, namespace FROM {$table} WHERE menudisp=";
$sql .= $this->KHXC_DB->quote(1);

$result = $this->KHXC_DB->sql_do(array('sql'    => $sql,
                                       'table'  => $table,
                                       'order'  => array('menuorder' => 'ASC')));

and change it to (add ref to the list of columns pulled from the database)

Code:

$sql  = "SELECT name, namespace, ref FROM {$table} WHERE menudisp=";
$sql .= $this->KHXC_DB->quote(1);

$result = $this->KHXC_DB->sql_do(array('sql'    => $sql,
                                       'table'  => $table,
                                       'order'  => array('menuorder' => 'ASC')));

then find this

Code:

foreach ($result as $num => $row) {

     $menu_array[] = array('text'      => $row['name'],
                           'app'       => $this->app,
                           'namespace' => $row['namespace'],
                           'params'    => array());

} // End of foreach statement.

and change it to

Code:

foreach ($result as $num => $row) {

if (empty($row['ref'])) {$params = array();} else { $params = array('ref' => $row['ref']);}

     $menu_array[] = array('text'      => $row['name'],
                           'app'       => $this->app,
                           'namespace' => $row['namespace'],
                           'params'    => $params);

} // End of foreach statement.

and then you should have a functioning link in your Online Store menu that will take you the the terms of use html page, this will in-turn work for any other page in the site as long as you know the namespace and reference needed to get to it. Keep in mind that this edit could be overwritten in updates and  you should make a backup of the file just in case you mess something up.

John

Last edited by dh783 (01-25-2009 16:27:10)

Offline

 

#5 01-25-2009 11:40:55

jherr
Member
Registered: 09-12-2008
Posts: 26

Re: Online Store Menu

Thanks John, this is great and I managed the first part but I can't get to the fun part because I can't for the life of me find "private_dir/app/ccp0/ccp/ext/femenues.php". How can I get to this file?

Offline

 

#6 01-25-2009 12:11:40

Dave
Member
Registered: 07-05-2003
Posts: 11233

Re: Online Store Menu

Using your FTP client.  That's the directory path to the file on your server.  It isn't something that is available through the admin interface.

Offline

 

#7 01-25-2009 14:08:34

jherr
Member
Registered: 09-12-2008
Posts: 26

Re: Online Store Menu

I think I'm missing something because using my Ftp client I can't find any directory called "app". I have /khxc-private/apps/gbu0/ but no ccp0 and in the /khxc there is no private_dir. I downloaded the whole site and a search for "femenues.php" brought up nothing. I'm using the UK version so is it possible that this file has a different name?

Offline

 

#8 01-25-2009 14:36:14

Dave
Member
Registered: 07-05-2003
Posts: 11233

Re: Online Store Menu

khxc-private/apps/gbu0/GBU/ext is the directory where it resides for the UK version and the file John referenced is named femenus.php in that directory.  We use private_dir or {private} most of the time because the name of the private directory is up to you, the installer, and it may have any name desired.

Offline

 

#9 01-25-2009 15:50:20

jherr
Member
Registered: 09-12-2008
Posts: 26

Re: Online Store Menu

Thank you, I got it and I'm almost there but need to ask you one more question. When I click on the new menu item that I added, the Url has this : "=display&ref=+termsofuse" and I think because there is an extra + sign, I get a page not found. Where in the code can I go and remove the + sign?

Offline

 

#10 01-25-2009 16:19:20

Dave
Member
Registered: 07-05-2003
Posts: 11233

Re: Online Store Menu

Errr, what exactly did you add?  Or do you have a URL that shows the problem?

Offline

 

#11 01-25-2009 16:33:09

dh783
Member
From: Avondale, Arizona
Registered: 04-06-2005
Posts: 6233
Website

Re: Online Store Menu

Sorry for the typoes in my last post, I have corrected them. I would check the entry you made for that link in the database for gbu0_storemenu and make sure there is no leading space in the field you created in front of termsofuse.

John

Offline

 

#12 01-25-2009 17:00:39

jherr
Member
Registered: 09-12-2008
Posts: 26

Re: Online Store Menu

Thank you both, it worked perfectly. I removed the leading space and that fixed it. This was fun for me, hope it wasn't a pain for you.

Offline

 

Board footer