Forums / General Questions / Bookmarking.......but not that one

Bookmarking.......but not that one

Locked

Views: 693

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
19 May 2009, 6:29 AM
#1
doddsey_65 avatar

doddsey_65

New Zenner

Join Date:
Jan 2009
Posts:
51
Plugin Contributions:
0

Bookmarking.......but not that one

Okay I'll explain as best as I can.

I want a bookmarking feature but not the kind that opens up the my favorites box.

What I need is as follows:

Customer goes onto contact us page.
They have an option there to bookmark that page.
When clicked it will send the name of that page and a relevent hyperlink to their my account section so that when they visit their account the page nae and link will appear so they can click on it there.

Did that make sense? If not I will try to explain it better.
Is this possible and how hard is it? I thought it would be easy before I attempted it. How wrong was I!

Cheers for any help you can offer.

19 May 2009, 7:51 AM
#2
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Bookmarking.......but not that one

What is the point of wanting to do this?

There are several options you can invoke very easily that will provide links to the Contact Us page, including header, sideboxes and footer positions. These are "common" to all displayed pages and will always be visible.

Additionally, when logged in, the user's details are parsed into essential fields in the Contact Us form anyway...

(To get to My Account, they have to be logged in, so by default, their details are parsed as indicated. So just hard-code the link: index.php?main_page=contact_us into your My Account php template page and hey presto... you will have achieved what you are after.)

20 years a Zencart User

19 May 2009, 7:53 AM
#3
doddsey_65 avatar

doddsey_65

New Zenner

Join Date:
Jan 2009
Posts:
51
Plugin Contributions:
0

Re: Bookmarking.......but not that one

sorry but i should have mentioned that i used the contact page as an example.
I madea multi site module where by other people have shops and admins that they control
and customers can buy stuff from them. I want it so that when they visit another shop
they can bookmark it and that bookmark is saved in their My Account for future reference.

19 May 2009, 6:23 PM
#4
doddsey_65 avatar

doddsey_65

New Zenner

Join Date:
Jan 2009
Posts:
51
Plugin Contributions:
0

Re: Bookmarking.......but not that one

Anyone? I really need this feature. I am not very good at php but heres what I have so far.

<?php 
$con = mysql_connect("xxxx","xxxx","xxxx");
if (!$con){
   die('Could not connect: ' . mysql_error());}
mysql_select_db("mydatabase", $con);
$url= $_SERVER['REQUEST_URI'];

mysql_query("INSERT INTO
                    mydatabase_customers
                    (customers_favorites) 
                    VALUES('$url')");

echo 'Data Inserted';

mysql_close($con);
?>

That is inserting the current pages url into the database table customers. And it will be easy enough to pull this data when in my account section to display it.

However I cannot get it so that it enters the data into the row of the currently active customer. Heres what I tried which didn't work.

 
$currid = $_SESSION['customer_id']; 
 
mysql_query("INSERT INTO 
                    mydatabase_customers
                    (customers_favorites) 
                    VALUES('$url') 
                    WHERE customers_id = $currid");
 

Can anyone help this. Anything will be appreciated.

Cheers!