In TomatoCart, you could active the regulations for the checkout one page and create account page under Admin Panel > Configuration > Configuration > Regulations.
After the activation, you have to enter the content for the ‘Privacy Notice’ and ‘Conditions of Use’ under Admin Panel > Definitions > Information.
You may notice that the privacy notice in the create account page is shown in the popup box. So, the customer will not be redirected to another page to read the content.
But the Conditions of Use in the checkout one page is linked to a new page rather than shown in a popup box. This is not friendly for the customers. So we have to improve it as follows.
Note: please make sure you are using the TomatoCart version greater than 1.1.8.
Step 1
— Go to the includes/content/checkout/checkout.php and find the following code:
$this->addHeaderJavascriptFilename('includes/javascript/checkout.js');
— Please add the following code after it:
$this->addStyleSheet('ext/multibox/multibox.css'); $this->addJavascriptFilename('ext/multibox/Overlay.js'); $this->addJavascriptFilename('ext/multibox/MultiBox.js');
Step 2
— Go to includes/javascript/checkout.js and find the following code:
$('paymentInformationForm').getElement('div').set('html', result.form);
— Please add the following code after it:
var overlay = new Overlay(); var box = new MultiBox('multibox', { overlay: overlay });
— Find the following code:
$('paymentInformationForm').getElement('div').set('html', json.form);
— Please add the following code after it:
var overlay = new Overlay(); var box = new MultiBox('multibox', { overlay: overlay });
Step 3
— Go to includes/modules/payment_method_form.php and find the following code
echo sprintf($osC_Language->get('order_conditions_description'), osc_href_link(FILENAME_INFO, 'articles&articles_id=' . 4)) . '<br /><br />' . osc_draw_checkbox_field('conditions', array(array('id' => 1, 'text' => $osC_Language->get('order_conditions_acknowledge'))), false);
— Please replace it with the following code:
echo str_replace('<a href="%s">', '<a href="' . osc_href_link(FILENAME_JSON, 'module=checkout&action=display_conditions') . '" class="multibox" rel="width:800,height:400,ajax:true">', $osC_Language->get('order_conditions_description')) . '<br /><br />' . osc_draw_checkbox_field('conditions', array(array('id' => 1, 'text' => $osC_Language->get('order_conditions_acknowledge'))), false);
Step 4
— Go to includes/modules/jsons/checkout.php and then add the following function into the class:
function displayConditions() { global $osC_Language, $osC_Image; $osC_Language->load('info'); require_once('includes/classes/articles.php'); $article = toC_Articles::getEntry(4); $content = '<div style="margin: 10px">'; $content .= '<h1>' . $article['articles_name'] . '</h1>'; if (!osc_empty($article['articles_image'])) { $content .= '<p style="float: right; padding: 0px 5px 5px 5px">' . $osC_Image->show($article['articles_image'], $article['articles_image'], '', 'product_info', 'articles') . '</p>'; } $content .= '<p>' . $article['articles_description'] . '</p>'; $content .= '</div>'; echo $content; }
Done. After that, the Conditions of Use in the checkout page will also be displayed in the popup box. This feature will be integrated into the v1.1.9 and v2.0.
It may be difficult for you to apply these modifications. If you couldn’t do it by yourself, please contact TomatoCart technical support to assist you:
Email: support@tomatocart.com
Looking for quality TomatoCart Hosting? Look no further than Arvixe Web Hosting!