Author Topic: Layout cart changes in vm2.0.26  (Read 13295 times)

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9178
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Layout cart changes in vm2.0.26
« on: December 13, 2013, 17:13:06 pm »
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

Code: [Select]
if ($this->checkout_task) {
$taskRoute = '&task=' . $this->checkout_task;
}
else {
$taskRoute = '';
}

Delete it.

Then open the default_pricelist.php

search around line 338 for

Code: [Select]
<?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

Code: [Select]
<?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.

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