News:

Looking for documentation? Take a look on our wiki

Main Menu

Layout cart changes in vm2.0.26

Started by Milbo, December 13, 2013, 17:13:06 PM

Previous topic - Next topic

Milbo

The form of the OPC is now beginning earlier so that we can send directly more data. But the start of the form is in case of the OPC within the sublayout "pricelist" => default_pricelist.php.

So in case you have already an override for the OPC, then search in the default.php around line 115 for


if ($this->checkout_task) {
$taskRoute = '&task=' . $this->checkout_task;
}
else {
$taskRoute = '';
}


Delete it.

Then open the default_pricelist.php

search around line 338 for


<?php
if (
$i) {
$i 1;
} else {
$i 0;
}
?>



<tr class="sectiontableentry1" valign="top">


We just add now the begin of the form BEFORE the <tr class="sectiontableentry" > so that it looks like this


<?php
if (
$i) {
$i 1;
} else {
$i 0;
}
}

if (
$this->checkout_task) {
$taskRoute '&task=' $this->checkout_task;
}
else {
$taskRoute '';
}
if (
VmConfig::get('oncheckout_opc'1)) {
?>

<form method="post" id="checkoutForm" name="checkoutForm" action="<?php echo JRoute::('index.php?option=com_virtuemart&view=cart' $taskRoute$this->useXHTML$this->useSSL); ?>">
<?php ?>

<tr class="sectiontableentry1" valign="top">


In case you are using the old checkout there shouldnt be any changes necessary.

Some people noticed that we are suggesting non standard html, but somehow it works.

The correct way is to close the table and to start it again, because form tags are not alllowed within tables. We cannot let start the table at begin of the form, because the product update/remove icons need an own form (yeh silly). The problem is solved in vm2.1, but not trivial for vm2.0.

Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/