News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Display checkout steps

Started by Setko, August 12, 2012, 18:07:53 PM

Previous topic - Next topic

Setko

I didn't find any answer on forum about all 4 checkout steps. What i'm trying to do is to display on which step you are. Everything is working fine except the last one, which shows that you are one first step as well. First and last steps are in same php file so you can't do it like with other 2 steps, which are in separated files.
What i figured out is, that when you are on first step, the last one is working fine and it shows like you are not on last step. But if i'm on last step, it shows that i'm on last and first step. It's because the last step shows only if you are on step 4 probably. I didn't have any luck with coding first step.
I want to display first step only if you are on it and not when you are on last one as well.

This is code for first, second and third step:
Quote<?php
      if (VmConfig::get('oncheckout_show_steps', 1)){
          echo '<div class="checkoutStep" id="checkoutStep1">' . JText::_('COM_VIRTUEMART_USER_FORM_CART_STEP1') . '</div>';
      }?>

And this is for last step to show it only if you are on it:
Quote<?php if (VmConfig::get('oncheckout_show_steps', 1) && $this->checkout_task==='confirm'){
      vmdebug('checkout_task',$this->checkout_task);
      echo '<div class="checkoutStep" id="checkoutStep4">'.JText::_('COM_VIRTUEMART_USER_FORM_CART_STEP4').'</div>';
       } ?>

Did anyone else do that and have any answers or solutions? I attached pictures to show you what i mean.

[attachment cleanup by admin]

Setko


PRO


shplanck

I'm having the exact same problem. If Virtuemart showed all four steps, this wouldn't be an issue.

The link to making your own steps doesn't address this issue at all.

Some actual help from the VM team on this would be very much appreciated.

Seems to me, if "show checkout steps" is checked, all 4 steps should show. After all, how many journeys begin with the 2nd step?
Q:What did the Buddhist say to the hot dog vendor? A: Make me one with everything.

Joomla 2.5.27
VM 2.0.20b
php 5.3

froston

My solution on this web - www.jakubkolo.cz (Joomla 3, Virtuemart 3)
- added sublayout steps.php where I have html code showing 4 steps - address, payment, shipment, checkout
- in /html/com_virtuemart/cart/defautl.php .. select_payment.php .. select_shipment.php and com_virtuemart/user/edit_address.php - I render the sublayout
- was neccesary little change in com_virtuemart/controller/cart.php function display() on page 110 ... added condition for redirect (or $task=='updatecart')

Milbo

Quote from: Setko on August 12, 2012, 18:07:53 PM

And this is for last step to show it only if you are on it:
Quote<?php if (VmConfig::get('oncheckout_show_steps', 1) && $this->checkout_task==='confirm'){
      vmdebug('checkout_task',$this->checkout_task);
      echo '<div class="checkoutStep" id="checkoutStep4">'.JText::_('COM_VIRTUEMART_USER_FORM_CART_STEP4').'</div>';
       } ?>

Did anyone else do that and have any answers or solutions? I attached pictures to show you what i mean.

I cannot find step 1 actually. But you may try this code for line 32-38 (default.php)

<?php if (VmConfig::get ('oncheckout_show_steps'1) ){
if($this->checkout_task == 'checkout') {
echo '<div class="checkoutStep" id="checkoutStep1">' vmText::('COM_VIRTUEMART_USER_FORM_CART_STEP1') . '</div>';
} else { //if($this->checkout_task == 'confirm') {
echo '<div class="checkoutStep" id="checkoutStep4">' vmText::('COM_VIRTUEMART_USER_FORM_CART_STEP4') . '</div>';
}
}  ?>



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