Sales convertion landing page

Modules, Add-ons and custom code that's more than just a quick hack or Mod.
Post Reply
mozack
Posts: 27
Joined: Tue Mar 30, 2010 2:32 pm

Sales convertion landing page

Post by mozack »

Hi,

I'm making a new project to my store. I want something that i cant do alone, and i really want your help. Unfortunately interspire forum is not helping resolving this situations.

Here is my point. Create one landing page integrated with shopping cart that show custom content depending of user search, or referring adwords. I want to ensure that the money i spend in adwords have good ROI, and for that i thought something that can help all of you.

To start, i have created a new file in includes/display/ called LandPageContent.php folder to make all my needs. After that, i created another 2 files in theme folder, 1 that is the template file called _landing.html and another that is the Panel.

Finally, i created a new page in admin and called it Landing, the address is mywebsite.com/pages/Landing.html and set as template de _landing.html created above. Everything is fine and showing correctly but i need more...

No are coming my doubts. Once my php script LandPageContent.php integrated with top.php and bottom.php is it possible to change the page meta title, meta description and keyword?

Example, if i in admin make in keywords or page title something like %%keyword%% can i change that after with the php inside display folder? or it must be in top.php? I want to replace the variable %%keyword%% by the keyword that user have searched to find my webpage.

I have created an MySQL table called isc_gkeywords with columns: ID, Keyword, Cat, Hits. The column Cat mus be updated manually, but all the others must be updated by file LandPageContent.php.

Here is another problem, if keyword exist in db isc_gkeywords, when user come with this keyword the php will update the hits to +1. After, if keyword exist and is assigned to a category, it shows products from this category, by this way, i can view the most searched keywords and also preform the result and what products are selling better.

But, if keyword is not assigned in DB, when user search for that, the LandPageContent.php will insert in db, after, manually i will add the keyword to the best category.

Here what i want to do with this landing pages, now, what i want:

How to replace the variable %%keyword%% from title, description, etc? with LandPageContent.php I have this code that is not doing nothing:

Code: Select all

		if ($_GET['kw']) {
			$key = $_GET['kw'];
		}

		$query = sprintf("SELECT pagekeywords, pagedesc, pagemetatitle FROM [|PREFIX|]pages WHERE pageid = '35'");
		$result = $GLOBALS['ISC_CLASS_DB']->Query($query);
		while($row = mysql_fetch_array($result))
		{
			if ($result) {
				$mood = str_replace('%%kw%%', $key, $row);

			} 
			else {

				$mood = $key;
			}
		}
Is possible to change?

Another question, how to insert in db from the file? I have this code it is also not working:

Code: Select all

		if ($_GET['kw'] OR $_GET['kw'] != "")
		{
			$textkey = strtolower($_GET['kw']);
			$h1key = ucwords($_GET['kw']); 
			
			//mysql_query("UPDATE countertable SET count=count+1");
			$query = "UPDATE [|PREFIX|]gkeywords SET hit=hit+1 WHERE keyword=$textkey";
			$result = $GLOBALS['ISC_CLASS_DB']->Query($query);
			if (mysql_affected_rows($result)==0) {
				$query = "INSERT INTO [|PREFIX|]gkeywords (keyword, hit) values ('$textkey', hit+1)";
				$result = $GLOBALS['ISC_CLASS_DB']->Query($query);
				return $result;
			}			
Well i think all of this work will give us a return. Maybe later, after this working, we'll can update and extend the code to admin and have a detailed wich keywords are more rentable and wich ones give us more money, maybe after that i put in admin something that can track and change keywords from there.

Hope someone can help me in this journey...

Thanks

Mozack
Post Reply