Custom Page

I want to create a custom popup window that explains the CVV code. In early version of 2.0.x, I had this working, but the 2.0.8 upgrade has broken it. Can anyone tell me how to do this with 2.0.8?



Here’s the code I was using before to call in my custom cvv.tpl template:

define('AREA', 'C');
define('AREA_NAME' ,'customer');
require './prepare.php';
require './init.php';

define('INDEX_SCRIPT', Registry::get('config.customer_index'));

Profiler::checkpoint('After init');

fn_dispatch();

Profiler::checkpoint('Before TPL');

Registry::get('view')->display('cvv.tpl');
Profiler::checkpoint('After TPL');
?>

not a good idea to use php code within templates, however if you really want to do this you need to wrap the code in smarty php brackets, example:



{php}

your code here

{/php}

May first post may have been less than clear…



I created a cvv.php page in the root of my store and called in the content of my cvv.tpl template in my skin.



It used to work. Now it doesn’t. Is there a new way of doing this?

This happens because the Profiler and tpl display codes have been moved internally into fn_dispatch.



I am not sure if this code works since I’ve not tested it but you can try.



define('AREA', 'C');
define('AREA_NAME' ,'customer');
require './prepare.php';
require './init.php';

define('INDEX_SCRIPT', Registry::get('config.customer_index'));

Registry::set('root_template', 'cvv.tpl');

fn_dispatch();







Let me know if it works. ^^

From CS-Cart support:

define('AREA', 'C');
define('AREA_NAME' ,'customer');
require './prepare.php';
require './init.php';

define('INDEX_SCRIPT', Registry::get('config.customer_index'));
Registry::set('root_template', 'cvv.tpl');
fn_dispatch();

Well, same as my code. ~ :stuck_out_tongue:

Can you explain how to make pop-up for cvv ?



I like to make one also.

Why aren’t you just using a link (anchor tag) with target=“_parent”?



I must be missing what you’re trying to do. As I understand it you don’t need access to any of the cart files or data, you simply want to show an html page in a pop-up window. Me thinks if that’s all you want to do, the anchor tag would be best suited.