cancel
Showing results for 
Search instead for 
Did you mean: 

Product selection in drop down menu, dl.php change buy-now.html to actual product URL on selection

   Did you know you can see the translated content as per your choice?

Translation is in progress. Please check again after few minutes.

Product selection in drop down menu, dl.php change buy-now.html to actual product URL on selection

Hello,

 

Our site uses a dl.php drop down menu that users can select product by type. Once clicking it goes to the standard buy-now.html page and we want the selection to direct to the actual product page. I'd rather not post the entire script here as it may of been a custom written code. PM me for details, Here is a sniplet.:

 

<?php
require_once('app/Mage.php'); //Path to Magento
umask(0);
Mage::app();

$singleProductUrl = 'buy-now.html';
$session = Mage::getSingleton("core/session", array("name"=>"frontend"));

// get session data
$data1 = $session->getData("data_1");
$data2 = $session->getData("data_2");
$data3 = $session->getData("data_3");
$data4 = $session->getData("data_4");

............................

...........................

etc///

 

What I was trying to do was change the $singleProductURL = 'buy-now.html'; to something like $singleProductURL = "php echo $data1-$data2-$data3-$data4.html But not sure if its possible to get selection data into the actual url for product pages. 

 

Any help would be great.

 

Thanks.