VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: Clocked0ne on April 18, 2012, 14:06:44 PM

Title: Checkout by stages
Post by: Clocked0ne on April 18, 2012, 14:06:44 PM
I was trying to find a solution to my problem, it seems while marked solved this thread doesn't really address the problem in much detail:
http://forum.virtuemart.net/index.php?topic=98755.0 (http://forum.virtuemart.net/index.php?topic=98755.0)


I am struggling to get the checkout working in a logical fashion and I cannot even get the 'Checkout Steps' to show at all, my clients are now complaining they want to change software because they think the cart/checkout is too confusing for people to use :(

Can anyone advise what I am missing to show the checkout steps?

Joomla 1.7 and VM2.0.6 using default cart view template markup

[attachment cleanup by admin]
Title: Re: Checkout by stages
Post by: Clocked0ne on April 19, 2012, 23:48:04 PM
The checkout seems to have gone backwards in ease of use from VM1, is there any way to get it to work the same as on VM1 sites where you go through step-by-step, e.g:

http://www.superstrands.com/virtuemart.html?page=shop.cart&mode=1 (http://www.superstrands.com/virtuemart.html?page=shop.cart&mode=1) or http://www.ayokaflowers.com/view-your-cart-content.html (http://www.ayokaflowers.com/view-your-cart-content.html) both have great VM carts (add something to the basket to see).
Title: Re: Checkout by stages
Post by: Clocked0ne on April 20, 2012, 02:06:59 AM
Why does every step go back to the Cart page?

Why not simply: Cart > Login > Shipping > Payment > DONE
That's just 4 steps from the cart!

I tried taking the Shipping options off the basket to see if this would improve the process (as advised in another thread) but it makes no difference.
Instead the customer always gets the following series of circus hoops (see attached screenshots to match):

Page 1 - Cart
index.php/shopping-basket

Page 2 - Edit Address/Login/Register
index.php/my-account/editaddresscartBT
- Filled in details and chose Checkout as Guest
---- No Checkout Step label anywhere

Page 3 - Cart again :o
index.php/shopping-basket
---- No Checkout Step label anywhere

Page 4  - Payment
index.php/shopping-basket/edit_shipment
- chose a rate and clicked Save
---- Finally a Checkout Step! 'Step 2' though???

Page 5 - Cart again AGAIN >:(
index.php/shopping-basket/checkout
---- Now another Checkout Step 'Step 4' huh???


This is not simple for customers, guys :(

[attachment cleanup by admin]
Title: Re: Checkout by stages
Post by: nvsdesign on April 23, 2012, 10:11:15 AM
This is exactly my problem, I also need simple checkout steps for my shop just like it was in VM1.
It´s very confusing to my customers and even to me how it´s currently working.

I see a lot of questions on the forum from people who want to change this, so why aren´t the developers taking action on this?
If someone comes with a solution, please let me know!
Title: Re: Checkout by stages
Post by: Clocked0ne on May 17, 2012, 12:52:51 PM
I gave up on the VM standard Checkout and am using Rupostel One Page Checkout (http://www.rupostel.com/one-page-checkout-component/features/available-checkout-templates) instead, it works very well, no confusing format or headaches!
Title: Re: Checkout by stages
Post by: PRO on May 17, 2012, 15:57:55 PM
I make steps myself


<?php if (empty($this->cart->BT)){ ?>
<img alt="Attention" src="/demo/images/red.png" /> Please Fill in your billing address<br/>
<?php }?>

^^ When Billing Address is empty

<?php if (!empty($this->cart->BT)){ ?>
<img alt="Attention" src="/demo/images/green.png" /> Billing Address Completed<br/>
<?php }?>

^^ After Billing Address Completed


<?php if ($this->cart->cartData['paymentName'] == 'No payment selected') {?>
<img alt="Attention" src="/demo/images/red.png" /> Select your payment <br/>
<?php }?>

^^^
When no payment is selected

<?php if ($this->cart->cartData['paymentName'] != 'No payment selected') {?>
<img alt="Attention" src="/demo/images/green.png" /> Payment Selected <br/>
<?php }?>

After payment selected

<?php if (!empty($this->cart->BT)){
  if ($this->cart->cartData['paymentName'] != 'No payment selected') { ?>
  <img alt="Attention" src="/demo/images/green.png" /> Almost Done: Please Confirm Order<br/>
 
  <?php }}?>

When billing, and payment have been filled in

[attachment cleanup by admin]
Title: Re: Checkout by stages
Post by: anotart on May 17, 2012, 16:33:25 PM
This looks like it would work for me -- I'm not sure where you would put that code.  Can you help me with that please?

Thanks for sharing your solution!
Title: Re: Checkout by stages
Post by: PRO on May 17, 2012, 18:26:08 PM
Quote from: anotart on May 17, 2012, 16:33:25 PM
This looks like it would work for me -- I'm not sure where you would put that code.  Can you help me with that please?

Thanks for sharing your solution!

i put mine in the cart template

tmpl/default.php
Title: Re: Checkout by stages
Post by: anotart on May 19, 2012, 01:51:43 AM
Thank you!
Title: Re: Checkout by stages
Post by: JanZet on July 27, 2012, 13:01:04 PM
Hello BanquetTables.pro,
Is it possible you put your \templates\<template_name>\html\com_virtuemart\cart\default.php here?
Thanks in advance,
Jan
Title: Re: Checkout by stages
Post by: PRO on July 27, 2012, 13:53:34 PM
Quote from: JanZet on July 27, 2012, 13:01:04 PM
Hello BanquetTables.pro,
Is it possible you put your \templates\<template_name>\html\com_virtuemart\cart\default.php here?
Thanks in advance,
Jan

Yes, thats excatly how you do it.

a "template override"  http://forum.virtuemart.net/index.php?topic=90935.0

Title: Re: Checkout by stages
Post by: JanZet on July 27, 2012, 16:33:29 PM
Can you give me the full code of your default.php please?

I would like to have an example, so I can make changes.

Kind Regards,
Jan 
Title: Re: Checkout by stages
Post by: PRO on July 27, 2012, 16:44:09 PM
I use a separate file , and just do include

Just add this where you want it
<?php include("steps.php"); ?>


I have attached the file, BUT it is renamed to .txt

[attachment cleanup by admin]
Title: Re: Checkout by stages
Post by: dorex on May 12, 2013, 17:55:50 PM
Quote from: PRO on May 17, 2012, 15:57:55 PM



<?php if ($this->cart->cartData['paymentName'] == 'No payment selected') {?>
<img alt="Attention" src="/demo/images/red.png" /> Select your payment <br/>
<?php }?>

^^^
When no payment is selected


This one doesn't work ... It shows up "Payment selected" and green.png instead of  "Select your payment" and red.png
I tried calling steps.php in different files ( in default.php, at the beginning or at the end of default_pricelist.php) and still same problem.
Any ideas why? Thank you in advance.
Title: Re: Checkout by stages
Post by: PRO on May 13, 2013, 10:53:56 AM
Quote from: dorex on May 12, 2013, 17:55:50 PM
Quote from: PRO on May 17, 2012, 15:57:55 PM



<?php if ($this->cart->cartData['paymentName'] == 'No payment selected') {?>
<img alt="Attention" src="/demo/images/red.png" /> Select your payment <br/>
<?php }?>

^^^
When no payment is selected


This one doesn't work ... It shows up "Payment selected" and green.png instead of  "Select your payment" and red.png
I tried calling steps.php in different files ( in default.php, at the beginning or at the end of default_pricelist.php) and still same problem.
Any ideas why? Thank you in advance.


dorex,

do you have a steps.php?


&& is it a language thing?

Title: Re: Checkout by stages
Post by: christoscologne on August 13, 2013, 17:07:26 PM
Hello Clocked One,

did you find a solution for your cart processing issues.

http://forum.virtuemart.net/index.php?topic=101492.0

I have exactly the same problem!

Thanks!
Title: Re: Checkout by stages
Post by: turoco on August 21, 2013, 16:17:06 PM
Quote from: dorex on May 12, 2013, 17:55:50 PM
Quote from: PRO on May 17, 2012, 15:57:55 PM



<?php if ($this->cart->cartData['paymentName'] == 'No payment selected') {?>
<img alt="Attention" src="/demo/images/red.png" /> Select your payment <br/>
<?php }?>

^^^
When no payment is selected


This one doesn't work ... It shows up "Payment selected" and green.png instead of  "Select your payment" and red.png
I tried calling steps.php in different files ( in default.php, at the beginning or at the end of default_pricelist.php) and still same problem.
Any ideas why? Thank you in advance.

Got the checkout steps working nicely according to instructions here: http://forum.virtuemart.net/index.php?topic=106459.0, but somehow when the user goes to the cart and has done nothing yet, the payment is already selected.

I have VM 2.0.6 and the automatic selection for shipping and payment is disabled in backend.

This is my current steps.php:
<?php if (empty($this->cart->BT)){ ?><span class="redtext bold left10">!</span> <a class="details bold font14 m4" href="<?php echo JRoute::_('index.php?option=com_virtuemart&view=user&task=editaddresscart&addrtype=BT',$this->useXHTML,$this->useSSL?>">
      Enter your billing address
      </a><br/><?php }?>
<?php if (!empty($this->cart->BT)){ ?><img alt="Attention" src="/images/green.png" /> Billing Address Completed<br/><?php }?>

<?php if ($this->cart->cartData['paymentName'] == 'No payment selected') {?><span class="redtext bold left10">!</span> <?php $this->select_payment_text='Select a payment pethod'; echo JHTML::_('link'JRoute::_('index.php?view=cart&task=editpayment',$this->useXHTML,$this->useSSL), $this->select_payment_text,'class="bold details font14 m4"'); ?>  <br/><?php }?>

<?php if ($this->cart->cartData['paymentName'] != 'No payment selected') {?><img alt="Attention" src="/images/green.png" /> Payment Selected <br/><?php }?>
<?php if ((!empty($this->cart->BT)) && (empty($this->cart->ST))){ ?>
      <a class="details bold font14" href="<?php echo JRoute::_('index.php?option=com_virtuemart&view=user&task=editaddresscart&addrtype=ST&virtuemart_user_id[]='.$this->cart->lists['current_id'],$this->useXHTML,$this->useSSL?>">
      Ship to a different address? </a><?php ?>

<?php if (((!empty($this->cart->BT))&& ($this->cart->cartData['paymentName'] != 'No payment selected') )&& ($this->cart->tosAccepted)){
 echo 
'<div class="bottom10 border bold center lightcream top10 left10 bblack" style="width:255px;font-size:21px;">';
         echo 
$this->checkout_link_html;
         
$text JText::_('COM_VIRTUEMART_ORDER_CONFIRM_MNU');
         echo 
'</div>';

}
?>


You asked another person having the same issue if it was a language thing?: http://forum.virtuemart.net/index.php?topic=101492.msg389340#msg389340 Do i need to edit another file so that the payment method will not be automatically selected when the user goes and checks his cart?
Title: Re: Checkout by stages
Post by: PRO on August 21, 2013, 22:22:52 PM
I dont even remember VM 2.0.6

I know it has many bugs
Title: Re: Checkout by stages
Post by: turoco on August 23, 2013, 08:47:26 AM
Quote from: PRO on August 21, 2013, 22:22:52 PM
I dont even remember VM 2.0.6

I know it has many bugs

First of all I wanna show my appreciation of you Pro for sometimes responding to the most stupidest questions going back to VM1 as far as i can remember. And I understand that any open source software needs to be developed and continued by public not only you and a few moderators, and thats hardly the case here in the VM forums opposed to the willingness of sharing code/knowledge in the WP/Magento forums. People sometimes ask a question here, get no answer, and somehow find there answer in the meantime, but dont post their solution back on here, leaving the rest reading unsatisfied threads.

This checkout issue, does the steps.php as you have created this work in the latest VM version, where the payment selection is not marked green as when the customer hasnt clicked on anything yet? I understand VM 2.0.6 is old and i keep holding on using old versions purposely as they may contain bugs, and newever versions may have resolved those bugs but might arrise new bugs.
Title: Re: Checkout by stages
Post by: PRO on August 27, 2013, 01:50:48 AM
Quote from: turoco on August 23, 2013, 08:47:26 AM

This checkout issue, does the steps.php as you have created this work in the latest VM version, where the payment selection is not marked green as when the customer hasnt clicked on anything yet? I understand VM 2.0.6 is old and i keep holding on using old versions purposely as they may contain bugs, and newever versions may have resolved those bugs but might arrise new bugs.

what exactly are you asking?
Title: Re: Checkout by stages
Post by: turoco on September 06, 2013, 19:54:10 PM
Quote from: PRO on August 27, 2013, 01:50:48 AM
Quote from: turoco on August 23, 2013, 08:47:26 AM

This checkout issue, does the steps.php as you have created this work in the latest VM version, where the payment selection is not marked green as when the customer hasnt clicked on anything yet? I understand VM 2.0.6 is old and i keep holding on using old versions purposely as they may contain bugs, and newever versions may have resolved those bugs but might arrise new bugs.

what exactly are you asking?


Pro,

All i need to make the VM2 checkout a bit more non-confusing for my stupid customers is that all stages get ticked of once filled in.
My checkout fases consist out of the following in the correct order:
Step 1: enter billing address
Step 2: choose shipping method
Step 3: choose payment method

thats all
Title: Re: Checkout by stages
Post by: PRO on September 08, 2013, 19:37:52 PM
Quote from: turoco on September 06, 2013, 19:54:10 PM
Quote from: PRO on August 27, 2013, 01:50:48 AM
Quote from: turoco on August 23, 2013, 08:47:26 AM

This checkout issue, does the steps.php as you have created this work in the latest VM version, where the payment selection is not marked green as when the customer hasnt clicked on anything yet? I understand VM 2.0.6 is old and i keep holding on using old versions purposely as they may contain bugs, and newever versions may have resolved those bugs but might arrise new bugs.

what exactly are you asking?


Pro,

All i need to make the VM2 checkout a bit more non-confusing for my stupid customers is that all stages get ticked of once filled in.
My checkout fases consist out of the following in the correct order:
Step 1: enter billing address
Step 2: choose shipping method
Step 3: choose payment method

thats all


thats what the code is for.

also more info here
http://forum.virtuemart.net/index.php?topic=106459.0
Title: Re: Checkout by stages
Post by: turoco on September 09, 2013, 15:40:27 PM
Quote from: PRO on September 08, 2013, 19:37:52 PM
Quote from: turoco on September 06, 2013, 19:54:10 PM
Quote from: PRO on August 27, 2013, 01:50:48 AM
Quote from: turoco on August 23, 2013, 08:47:26 AM

This checkout issue, does the steps.php as you have created this work in the latest VM version, where the payment selection is not marked green as when the customer hasnt clicked on anything yet? I understand VM 2.0.6 is old and i keep holding on using old versions purposely as they may contain bugs, and newever versions may have resolved those bugs but might arrise new bugs.

what exactly are you asking?


Pro,

All i need to make the VM2 checkout a bit more non-confusing for my stupid customers is that all stages get ticked of once filled in.
My checkout fases consist out of the following in the correct order:
Step 1: enter billing address
Step 2: choose shipping method
Step 3: choose payment method

thats all


thats what the code is for.

also more info here
http://forum.virtuemart.net/index.php?topic=106459.0


Yeah i got the code thanks, and part of it is working. When the billing info is filled in it gives a green checker, but when the shipment method and/or payment is succesfully selected no green checker appears...

This is my current steps.php:
<?php if (empty($this->cart->BT)){ ?><span class="redtext bold left10">!</span> <a class="details bold font14 m4" href="<?php echo JRoute::_('index.php?option=com_virtuemart&view=user&task=editaddresscart&addrtype=BT',$this->useXHTML,$this->useSSL?>">
      Enter your billing address
      </a><br/><?php }?>
<?php if (!empty($this->cart->BT)){ ?><img alt="Attention" src="/images/green.png" /> Billing Address Completed<br/><?php }?>

<?php if (empty($this->cart->shipmentName)){ ?><span class="redtext bold left10">!</span> <a class="details bold font14 m4" href="<?php echo JRoute::_('index.php?view=cart&task=editshipment',$this->useXHTML,$this->useSSL?>">
      Enter your shipment
      </a><br/><?php }?>
<?php if (!empty($this->cart->shipmentName)){ ?><img alt="Attention" src="/images/green.png" /> shipment method completed<br/><?php }?>

<?php if (empty($this->cart->paymentName)){ ?><span class="redtext bold left10">!</span> <a class="details bold font14 m4" href="<?php echo JRoute::_('index.php?view=cart&task=editpayment',$this->useXHTML,$this->useSSL?>">
      Enter your payment 2
      </a><br/><?php }?>
<?php if (!empty($this->cart->paymentName)){ ?><img alt="Attention" src="/images/green.png" /> payment method selected<br/><?php }?>



<?php if (((!empty($this->cart->BT))&& ($this->cart->cartData['paymentName'] != 'No payment selected') )&& ($this->cart->tosAccepted)){
 echo 
'<div class="bottom10 border bold center lightcream top10 left10 bblack" style="width:255px;font-size:21px;">';
         echo 
$this->checkout_link_html;
         
$text JText::_('COM_VIRTUEMART_ORDER_CONFIRM_MNU');
         echo 
'</div>';

}
?>



Title: Re: Checkout by stages
Post by: PRO on September 09, 2013, 21:23:20 PM
you cannot test for empty with payment and shipping.

because the name is
No payment selected
No shipment selected

Title: Re: Checkout by stages
Post by: turoco on September 10, 2013, 06:04:31 AM
Quote from: PRO on September 09, 2013, 21:23:20 PM
you cannot test for empty with payment and shipping.

because the name is
No payment selected
No shipment selected



What I meant is when you add products to the cart, then click on "show cart" and then it already shows that the payment method already is selected, while its not...
Title: Re: Checkout by stages
Post by: PRO on September 11, 2013, 01:31:07 AM
Quote from: turoco on September 10, 2013, 06:04:31 AM
Quote from: PRO on September 09, 2013, 21:23:20 PM
you cannot test for empty with payment and shipping.

because the name is
No payment selected
No shipment selected



What I meant is when you add products to the cart, then click on "show cart" and then it already shows that the payment method already is selected, while its not...

o , you are trying to "set payment"

these are not the codes for that. I saw something like that in the forums, but dont know where
Title: Re: Checkout by stages
Post by: Maxim Pishnyak on September 12, 2013, 10:35:24 AM
Quote from: PRO on September 11, 2013, 01:31:07 AM
o , you are trying to "set payment"
Turoco, did you try to search existing solution for this on forum?
Title: Re: Checkout by stages
Post by: turoco on September 14, 2013, 09:02:48 AM
Quote from: PRO on September 11, 2013, 01:31:07 AM
Quote from: turoco on September 10, 2013, 06:04:31 AM
Quote from: PRO on September 09, 2013, 21:23:20 PM
you cannot test for empty with payment and shipping.

because the name is
No payment selected
No shipment selected



What I meant is when you add products to the cart, then click on "show cart" and then it already shows that the payment method already is selected, while its not...

o , you are trying to "set payment"

these are not the codes for that. I saw something like that in the forums, but dont know where


No, i am not trying to set payment. I am trying to do what your site does....i tried to make my problem visible in a pic...see attatch:
(http://i.imgur.com/WQiPbUK.jpg)
Title: Re: Checkout by stages
Post by: turoco on September 14, 2013, 09:04:55 AM
Quote from: Maxim Pishnyak on September 12, 2013, 10:35:24 AM
Quote from: PRO on September 11, 2013, 01:31:07 AM
o , you are trying to "set payment"
Turoco, did you try to search existing solution for this on forum?

Yes i did, and i stumbled on this thread: http://forum.virtuemart.net/index.php?topic=106459.0 , I applied it, and then the problem arised that my Payment Method in the cart already is selected when in reality the customer still has to select a payment method...
Title: Re: Checkout by stages
Post by: Maxim Pishnyak on September 14, 2013, 09:21:11 AM
1.
Quote from: turoco on September 14, 2013, 09:02:48 AM
Quote from: PRO on September 11, 2013, 01:31:07 AM
o , you are trying to "set payment"
these are not the codes for that. I saw something like that in the forums, but dont know where
No, i am not trying to set payment.
2.
Quote from: turoco on September 14, 2013, 09:04:55 AM
Quote from: Maxim Pishnyak on September 12, 2013, 10:35:24 AM
Quote from: PRO on September 11, 2013, 01:31:07 AM
o , you are trying to "set payment"
Turoco, did you try to search existing solution for this on forum?
...
So are you trying to set payment (2.) or are you not trying to do this (1.)?
Title: Re: Checkout by stages
Post by: turoco on September 14, 2013, 14:20:18 PM
Quote from: Maxim Pishnyak on September 14, 2013, 09:21:11 AM
1.
Quote from: turoco on September 14, 2013, 09:02:48 AM
Quote from: PRO on September 11, 2013, 01:31:07 AM
o , you are trying to "set payment"
these are not the codes for that. I saw something like that in the forums, but dont know where
No, i am not trying to set payment.
2.
Quote from: turoco on September 14, 2013, 09:04:55 AM
Quote from: Maxim Pishnyak on September 12, 2013, 10:35:24 AM
Quote from: PRO on September 11, 2013, 01:31:07 AM
o , you are trying to "set payment"
Turoco, did you try to search existing solution for this on forum?
...
So are you trying to set payment (2.) or are you not trying to do this (1.)?

I do not understand the definition of: "to set a payment". Im trying to get Pro's checkout working where the words: "payment method" will only be ticked off in green when a customer actually selects a payment.

BTW, is this checkout layout the same till 2.0.22? or has it changed in 2.0.22?
Title: Re: Checkout by stages
Post by: sfinx on September 16, 2013, 17:14:58 PM
I ve been reading this (and similar) posts for 2 days now and I just cant get anything to work.
I also need 4 step checkout in my shop. I am using latest 2.0.22c version .

I created steps.php, but I dont get it.. If I put link to steps in my default.php it just shows me like "Attention Billing Address Completed", "Attention billing adress completes" msg on a place that I added code - everything else on page is the same as before . There is still one page checkout there with aeverything (billing, select shipping, payment, coupon, terms....) .  I am not a programer, but as far as I see default.php actualy has complete one page checkout inside. I dont even get why are there separate "select shipment.php", "shopper adress.php" etc.

Some help or even better - complete code (default.php and steps.php) that works would be really apriciated. Otherwise I am gonna loose at least 14 days with this and I guess for some of you this woult take hmm... a minute - so please :)

I just cant belive that VM doesnt have that 4 step option.
Title: Re: Checkout by stages
Post by: PRO on September 17, 2013, 02:51:17 AM
Quote from: PRO on September 09, 2013, 21:23:20 PM
you cannot test for empty with payment and shipping.

because the name is
No payment selected
No shipment selected



<?php if (empty($this->cart->shipmentName)){ ?><span class="redtext bold left10">!</span> <a class="details bold font14 m4" href="<?php echo JRoute::_('index.php?view=cart&task=editshipment',$this->useXHTML,$this->useSSL) ?>">
      Enter your shipment
      </a><br/><?php }?>
<?php if (!empty($this->cart->shipmentName)){ ?><img alt="Attention" src="/images/green.png" /> shipment method completed<br/><?php }?>

<?php if (empty($this->cart->paymentName)){ ?><span class="redtext bold left10">!</span> <a class="details bold font14 m4" href="<?php echo JRoute::_('index.php?view=cart&task=editpayment',$this->useXHTML,$this->useSSL) ?>">
      Enter your payment 2
      </a><br/><?php }?>
<?php if (!empty($this->cart->paymentName)){ ?><img alt="Attention" src="/images/green.png" /> payment method selected<br/><?php }?>


^^^^^^^^^^^^^^^^^^^^^    this will NEVER work    (!empty($this->cart->shipmentName

BECAUSE the shipment name is NEVER empty. It will always be true and show a green check.
When no shipment is selected, it is "no shipment selected"
When no payment is selected, it is "no payment selected"

SO: when you test for an empty shipment name, or payment name. it will never be empty.

This is my current steps.php

<div class="cream border width60 bblack left10"><h2>Checkout Steps</h2>
<div class="left10">
<?php if (empty($this->cart->BT)){ ?><span class="redtext bold left10">!</span> <a class="details bold font14 m4" href="<?php echo JRoute::_('index.php?option=com_virtuemart&view=user&task=editaddresscart&addrtype=BT',$this->useXHTML,$this->useSSL) ?>">
      Please Fill Out Your Billing Address
      </a><br/><?php }?>
<?php if (!empty($this->cart->BT)){ ?><img alt="Attention" src="images/green.png" /> Billing Address Completed<br/><?php }?>

<?php if ($this->cart->cartData['paymentName'] == 'No payment selected') {?><span class="redtext bold left10">!</span> <?php $this->select_payment_text='Select Your Payment Method'; echo JHTML::_('link', JRoute::_('index.php?view=cart&task=editpayment',$this->useXHTML,$this->useSSL), $this->select_payment_text,'class="bold details font14 m4"'); ?>  <br/><?php }?>

<?php if ($this->cart->cartData['paymentName'] != 'No payment selected') {?><img alt="Attention" src="images/green.png" /> Payment Selected <br/><?php }?>
<?php if ((!empty($this->cart->BT)) && (empty($this->cart->ST))){ ?>
      <a class="details bold font14" href="<?php echo JRoute::_('index.php?option=com_virtuemart&view=user&task=editaddresscart&addrtype=ST&virtuemart_user_id[]='.$this->cart->lists['current_id'],$this->useXHTML,$this->useSSL) ?>">
      Add a Different Shipping Address </a><?php } ?>

<?php if (((!empty($this->cart->BT))&& ($this->cart->cartData['paymentName'] != 'No payment selected') )){
echo '<div class="bottom10 border bold center lightcream top10 left10 bblack" style="width:255px;font-size:25px;">';
         echo $this->checkout_link_html;
         $text = JText::_('COM_VIRTUEMART_ORDER_CONFIRM_MNU');
         echo '</div>';

}?>
</div></div>





IF you are using a NON english language, you have to change these texts
No payment selected
No shipment selected

I do not use multiple shipment methods, so you will not see it in my code


Title: Re: Checkout by stages
Post by: sfinx on September 17, 2013, 14:38:51 PM
PRO you really are a pro :)
Would you be so nice, to help me define where exactly in my default.php should I put lik to steps.php. Like I said my logic is that I would have to delete everything in it and only add link to steps, but that doesnt work...

My original (without modifications) defaul.php looks like this:

<?php defined ('_JEXEC') or die('Restricted access');
/*------------------------------------------------------------------------------------------------------------
# VP SuperMart! Joomla 2.5 Template for VirtueMart 2.0
# ------------------------------------------------------------------------------------------------------------
# Copyright (C) 2012 VirtuePlanet Services LLP. All Rights Reserved.
# License - GNU General Public License version 2. http://www.gnu.org/licenses/gpl-2.0.html
# Author: VirtuePlanet Services LLP
# Email: info@virtueplanet.com
# Websites:  http://www.virtueplanet.com
------------------------------------------------------------------------------------------------------------*/
vmJsApi::jPrice();
JHtml::('behavior.formvalidation');
$document JFactory::getDocument ();
$cartProductCount count($this->cart->products);
?>


<div class="cart-view row-fluid">
<div class="span12">
<h1 class="cart-page-title"><?php echo JText::('COM_VIRTUEMART_CART_TITLE'); ?>&nbsp;<span class="septa">/</span>&nbsp;<span><?php echo JText::sprintf('COM_VIRTUEMART_CART_X_PRODUCTS'$cartProductCount); ?></span></h1>
<?php echo shopFunctionsF::getLoginForm ($this->cartFALSE); ?>
</div>
<?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>';
?>
<?php include("steps.php"); ?>
<?php 
/* Cart Page Module - 'cart-promo' */
$attribs['style'] = 'container';
$db JFactory::getDBO();
$query "
SELECT *
FROM #__modules
WHERE published=1
AND position='cart-promo'
ORDER BY id
;"
;
$db->setQuery($query);
$modulesList $db->loadObjectList('id');
if(isset($modulesList)) {
echo '<div class="clear"></div>';
$cartModCount count($modulesList);
$N 1;
foreach($modulesList as $module) {
$module_title $module->title;
$module_name $module->module;
if (JModuleHelper::isEnabled($module_name)) {
  $mod JModuleHelper::getModule($module_name$module_title);
if($N==$cartModCount) {
$last ' last-mod';
} else {
$last '';
}
          echo 
'<div class="row-fluid"><div class="cart-promo-mod span12'.$last.'">'.JModuleHelper::renderModule($mod$attribs).'</div></div>';

$N++;

} ?>

<?php echo $this->loadTemplate ('pricelist');
if ($this->checkout_task) {
$taskRoute '&task=' $this->checkout_task;
}
else {
$taskRoute '';
?>

<form method="post" id="checkoutForm" name="checkoutForm" action="<?php echo JRoute::('index.php?option=com_virtuemart&view=cart' $taskRoute$this->useXHTML$this->useSSL); ?>">
<div id="checkout-advertise-box">
<?php if (!empty($this->checkoutAdvertise)) {
foreach ($this->checkoutAdvertise as $checkoutAdvertise) { ?>

<div class="checkout-advertise">
<?php echo $checkoutAdvertise?>
</div>
<?php }
}?>

</div>
<div class="customer-comment">
<span class="comment"><?php echo JText::('COM_VIRTUEMART_COMMENT_CART'); ?></span><br/>
<textarea class="customer-comment span12" name="customer_comment" cols="60" rows="3"><?php echo $this->cart->customer_comment?></textarea>
</div>
<div class="checkout-button-top">
<?php if (!class_exists ('VirtueMartModelUserfields')) {
require(JPATH_VM_ADMINISTRATOR DS 'models' DS 'userfields.php');
}
$userFieldsModel VmModel::getModel ('userfields');
if ($userFieldsModel->getIfRequired ('agreed')) { ?>

<label for="tosAccepted" class="checkbox">
<?php if (!class_exists ('VmHtml')) {
require(JPATH_VM_ADMINISTRATOR DS 'helpers' DS 'html.php');
}
echo VmHtml::checkbox ('tosAccepted'$this->cart->tosAccepted10'class="terms-of-service"');
if (VmConfig::get ('oncheckout_show_legal_info'1)) { ?>

<a href="#full-tos" class="terms-of-service" data-toggle="modal">
<?php echo JText::('COM_VIRTUEMART_CART_TOS_READ_AND_ACCEPTED'); ?>
</a>
<div class="boot-modal fade" id="full-tos" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="myModalLabel"><?php echo JText::('COM_VIRTUEMART_CART_TOS'); ?></h3>
</div>
<div class="modal-body">
<p><?php echo $this->cart->vendor->vendor_terms_of_service?></p>
</div>
</div>
<?php ?>
</label>
<?php ?>
<div class="row-fluid continue-checkout-box">
<div class="span6 continue-cont">
<?php if ($this->continue_link_html != '') {
echo $this->continue_link_html;
?>

</div>
<div class="span6 checkout-cont">
<?php echo $this->checkout_link_html?>
</div>
</div>
</div>
<input type='hidden' name='task' value='<?php echo $this->checkout_task?>'/>
<input type='hidden' name='option' value='com_virtuemart'/>
<input type='hidden' name='view' value='cart'/>
</form>
</div>
Title: Re: Checkout by stages
Post by: PRO on September 17, 2013, 15:50:58 PM
i would put it where you have it

Title: Re: Checkout by stages
Post by: sfinx on September 17, 2013, 17:27:04 PM
Ok, but if thats all that has to be done, why do I still have one page checkout? Do I need to delete some other files or something?

I attached print screen of my Cart page at the moment.

[attachment cleanup by admin]
Title: Re: Checkout by stages
Post by: PRO on September 18, 2013, 03:48:11 AM
that is because you have a template or plugin with 1 page checkout.

i dont know anything about it
Title: Re: Checkout by stages
Post by: sfinx on September 19, 2013, 10:32:26 AM
Is there any link where I can see you checkout page in action?
Title: Re: Checkout by stages
Post by: sfinx on September 19, 2013, 11:14:39 AM
Ok one more question. I am trying to get here, by creating every stage by my self. I understand what code to copy in certain stages, but I dont know php, so I dont know how to create button to navigate between steps.
So basically I will put link to step1.php in my default.php and when step1 opens and users edits it I would like to have button on the bottom (like go to next step) that would open step2.php. In the final step I will include order confirmation button. Hopefully that would work.

Other solution I thought about is that I would have stages all in one page, but in tabs. But again... thats just too much for my knowledge...
I know that must be pretty simple stuff, but like I said php is a mistery to me  :-[
Title: Re: Checkout by stages
Post by: turoco on September 20, 2013, 10:09:58 AM
Quote from: PRO on September 17, 2013, 02:51:17 AM
Quote from: PRO on September 09, 2013, 21:23:20 PM
you cannot test for empty with payment and shipping.

because the name is
No payment selected
No shipment selected



<?php if (empty($this->cart->shipmentName)){ ?><span class="redtext bold left10">!</span> <a class="details bold font14 m4" href="<?php echo JRoute::_('index.php?view=cart&task=editshipment',$this->useXHTML,$this->useSSL) ?>">
      Enter your shipment
      </a><br/><?php }?>
<?php if (!empty($this->cart->shipmentName)){ ?><img alt="Attention" src="/images/green.png" /> shipment method completed<br/><?php }?>

<?php if (empty($this->cart->paymentName)){ ?><span class="redtext bold left10">!</span> <a class="details bold font14 m4" href="<?php echo JRoute::_('index.php?view=cart&task=editpayment',$this->useXHTML,$this->useSSL) ?>">
      Enter your payment 2
      </a><br/><?php }?>
<?php if (!empty($this->cart->paymentName)){ ?><img alt="Attention" src="/images/green.png" /> payment method selected<br/><?php }?>


^^^^^^^^^^^^^^^^^^^^^    this will NEVER work    (!empty($this->cart->shipmentName

BECAUSE the shipment name is NEVER empty. It will always be true and show a green check.
When no shipment is selected, it is "no shipment selected"
When no payment is selected, it is "no payment selected"

SO: when you test for an empty shipment name, or payment name. it will never be empty.

This is my current steps.php

<div class="cream border width60 bblack left10"><h2>Checkout Steps</h2>
<div class="left10">
<?php if (empty($this->cart->BT)){ ?><span class="redtext bold left10">!</span> <a class="details bold font14 m4" href="<?php echo JRoute::_('index.php?option=com_virtuemart&view=user&task=editaddresscart&addrtype=BT',$this->useXHTML,$this->useSSL) ?>">
      Please Fill Out Your Billing Address
      </a><br/><?php }?>
<?php if (!empty($this->cart->BT)){ ?><img alt="Attention" src="images/green.png" /> Billing Address Completed<br/><?php }?>

<?php if ($this->cart->cartData['paymentName'] == 'No payment selected') {?><span class="redtext bold left10">!</span> <?php $this->select_payment_text='Select Your Payment Method'; echo JHTML::_('link', JRoute::_('index.php?view=cart&task=editpayment',$this->useXHTML,$this->useSSL), $this->select_payment_text,'class="bold details font14 m4"'); ?>  <br/><?php }?>

<?php if ($this->cart->cartData['paymentName'] != 'No payment selected') {?><img alt="Attention" src="images/green.png" /> Payment Selected <br/><?php }?>
<?php if ((!empty($this->cart->BT)) && (empty($this->cart->ST))){ ?>
      <a class="details bold font14" href="<?php echo JRoute::_('index.php?option=com_virtuemart&view=user&task=editaddresscart&addrtype=ST&virtuemart_user_id[]='.$this->cart->lists['current_id'],$this->useXHTML,$this->useSSL) ?>">
      Add a Different Shipping Address </a><?php } ?>

<?php if (((!empty($this->cart->BT))&& ($this->cart->cartData['paymentName'] != 'No payment selected') )){
echo '<div class="bottom10 border bold center lightcream top10 left10 bblack" style="width:255px;font-size:25px;">';
         echo $this->checkout_link_html;
         $text = JText::_('COM_VIRTUEMART_ORDER_CONFIRM_MNU');
         echo '</div>';

}?>
</div></div>





IF you are using a NON english language, you have to change these texts
No payment selected
No shipment selected

I do not use multiple shipment methods, so you will not see it in my code




I copy this exact code in step.php but it still shows payment is selected with a green tick when I aint even filled in my billing address nor shipping address. Why is the code automatically ticking of the payment method? where do i have to look? HELP...im crying
Title: Re: Checkout by stages
Post by: PRO on September 20, 2013, 16:31:40 PM
Quote from: sfinx on September 19, 2013, 10:32:26 AM
Is there any link where I can see you checkout page in action?

it should not be that hard to find my site.

I do not link to my site from the forum.

Look in my signature
Title: Re: Checkout by stages
Post by: PRO on September 20, 2013, 16:33:06 PM
Quote from: turoco on September 20, 2013, 10:09:58 AM
Quote from: PRO on September 17, 2013, 02:51:17 AM
Quote from: PRO on September 09, 2013, 21:23:20 PM
you cannot test for empty with payment and shipping.

because the name is
No payment selected
No shipment selected



<?php if (empty($this->cart->shipmentName)){ ?><span class="redtext bold left10">!</span> <a class="details bold font14 m4" href="<?php echo JRoute::_('index.php?view=cart&task=editshipment',$this->useXHTML,$this->useSSL) ?>">
      Enter your shipment
      </a><br/><?php }?>
<?php if (!empty($this->cart->shipmentName)){ ?><img alt="Attention" src="/images/green.png" /> shipment method completed<br/><?php }?>

<?php if (empty($this->cart->paymentName)){ ?><span class="redtext bold left10">!</span> <a class="details bold font14 m4" href="<?php echo JRoute::_('index.php?view=cart&task=editpayment',$this->useXHTML,$this->useSSL) ?>">
      Enter your payment 2
      </a><br/><?php }?>
<?php if (!empty($this->cart->paymentName)){ ?><img alt="Attention" src="/images/green.png" /> payment method selected<br/><?php }?>


^^^^^^^^^^^^^^^^^^^^^    this will NEVER work    (!empty($this->cart->shipmentName

BECAUSE the shipment name is NEVER empty. It will always be true and show a green check.
When no shipment is selected, it is "no shipment selected"
When no payment is selected, it is "no payment selected"

SO: when you test for an empty shipment name, or payment name. it will never be empty.

This is my current steps.php

<div class="cream border width60 bblack left10"><h2>Checkout Steps</h2>
<div class="left10">
<?php if (empty($this->cart->BT)){ ?><span class="redtext bold left10">!</span> <a class="details bold font14 m4" href="<?php echo JRoute::_('index.php?option=com_virtuemart&view=user&task=editaddresscart&addrtype=BT',$this->useXHTML,$this->useSSL) ?>">
      Please Fill Out Your Billing Address
      </a><br/><?php }?>
<?php if (!empty($this->cart->BT)){ ?><img alt="Attention" src="images/green.png" /> Billing Address Completed<br/><?php }?>

<?php if ($this->cart->cartData['paymentName'] == 'No payment selected') {?><span class="redtext bold left10">!</span> <?php $this->select_payment_text='Select Your Payment Method'; echo JHTML::_('link', JRoute::_('index.php?view=cart&task=editpayment',$this->useXHTML,$this->useSSL), $this->select_payment_text,'class="bold details font14 m4"'); ?>  <br/><?php }?>

<?php if ($this->cart->cartData['paymentName'] != 'No payment selected') {?><img alt="Attention" src="images/green.png" /> Payment Selected <br/><?php }?>
<?php if ((!empty($this->cart->BT)) && (empty($this->cart->ST))){ ?>
      <a class="details bold font14" href="<?php echo JRoute::_('index.php?option=com_virtuemart&view=user&task=editaddresscart&addrtype=ST&virtuemart_user_id[]='.$this->cart->lists['current_id'],$this->useXHTML,$this->useSSL) ?>">
      Add a Different Shipping Address </a><?php } ?>

<?php if (((!empty($this->cart->BT))&& ($this->cart->cartData['paymentName'] != 'No payment selected') )){
echo '<div class="bottom10 border bold center lightcream top10 left10 bblack" style="width:255px;font-size:25px;">';
         echo $this->checkout_link_html;
         $text = JText::_('COM_VIRTUEMART_ORDER_CONFIRM_MNU');
         echo '</div>';

}?>
</div></div>





IF you are using a NON english language, you have to change these texts
No payment selected
No shipment selected

I do not use multiple shipment methods, so you will not see it in my code




I copy this exact code in step.php but it still shows payment is selected with a green tick when I aint even filled in my billing address nor shipping address. Why is the code automatically ticking of the payment method? where do i have to look? HELP...im crying

post your url

a you using english as a language?
Title: Re: Checkout by stages
Post by: PRO on September 24, 2013, 00:03:30 AM
change this

<?php if ($this->cart->cartData['paymentName'] == 'No payment selected') {?><span class="redtext bold left10">!</span> <?php $this->select_payment_text='Select Your Payment Method'; echo JHTML::_('link', JRoute::_('index.php?view=cart&task=editpayment',$this->useXHTML,$this->useSSL), $this->select_payment_text,'class="bold details font14 m4"'); ?>  <br/><?php }?>

to this


<?php if (((!empty($this->cart->BT))&& ($this->cart->cartData['paymentName'] == 'No payment selected') )){ ?><span class="redtext bold left10">!</span> <?php $this->select_payment_text='Select Your Payment Method'; echo JHTML::_('link', JRoute::_('index.php?view=cart&task=editpayment',$this->useXHTML,$this->useSSL), $this->select_payment_text,'class="bold details font14 m4"'); ?>  <br/><?php }?>

Title: Re: Checkout by stages
Post by: turoco on September 24, 2013, 13:08:04 PM
fck, i wanna break my nuts now..still no change. The latest code looks like:
<div class="cream border width60 bblack left10"><h2>Checkout Steps</h2>
<div class="left10">
<?php if (empty($this->cart->BT)){ ?><span class="redtext bold left10">!</span> <a class="details bold font14 m4" href="<?php echo JRoute::_('index.php?option=com_virtuemart&view=user&task=editaddresscart&addrtype=BT',$this->useXHTML,$this->useSSL?>">
      Please Fill Out Your Billing Address
      </a><br/><?php }?>
<?php if (!empty($this->cart->BT)){ ?><img alt="Attention" src="images/green.png" /> Billing Address Completed<br/><?php }?>

<?php if (((!empty($this->cart->BT))&& ($this->cart->cartData['paymentName'] == 'No payment selected') )){ ?><span class="redtext bold left10">!</span> <?php $this->select_payment_text='Select Your Payment Method'; echo JHTML::_('link'JRoute::_('index.php?view=cart&task=editpayment',$this->useXHTML,$this->useSSL), $this->select_payment_text,'class="bold details font14 m4"'); ?>  <br/><?php }?>

<?php if ($this->cart->cartData['paymentName'] != 'No payment selected') {?><img alt="Attention" src="images/green.png" /> Payment Selected <br/><?php }?>
<?php if ((!empty($this->cart->BT)) && (empty($this->cart->ST))){ ?>
      <a class="details bold font14" href="<?php echo JRoute::_('index.php?option=com_virtuemart&view=user&task=editaddresscart&addrtype=ST&virtuemart_user_id[]='.$this->cart->lists['current_id'],$this->useXHTML,$this->useSSL?>">
      Add a Different Shipping Address </a><?php ?>

<?php if (((!empty($this->cart->BT))&& ($this->cart->cartData['paymentName'] != 'No payment selected') )){
 echo 
'<div class="bottom10 border bold center lightcream top10 left10 bblack" style="width:255px;font-size:25px;">';
         echo 
$this->checkout_link_html;
         
$text JText::_('COM_VIRTUEMART_ORDER_CONFIRM_MNU');
         echo 
'</div>';

}
?>

</div></div>



And already another member has made the VM2 checkout into a VM1 checkout but aint telling us the code: http://forum.virtuemart.net/index.php?topic=106459.msg393264#msg393264
Title: Re: Checkout by stages
Post by: PRO on September 25, 2013, 01:23:27 AM


change this


<?php if ($this->cart->cartData['paymentName'] != 'No payment selected') {?><img alt="Attention" src="images/green.png" /> Payment Selected <br/><?php }?>

to this

<?php if (((!empty($this->cart->BT))&& ($this->cart->cartData['paymentName'] != 'No payment selected') )){ ?><img alt="Attention" src="images/green.png" /> Payment Selected <br/><?php }?>


i think the problem comes from no payment methods will show at all, unless they are assigned to something.

Title: Re: Checkout by stages
Post by: rijojoy on January 02, 2014, 19:05:48 PM
Hi All,

I have customized my checkout based on UI tabs. have a look at the following site http://droidplayer.co.uk/index.php/shop-category/cart.html, if any of you guys looking for something like that then I can help you out.

Thanks & Regards
RJ
Title: Re: Checkout by stages
Post by: AH on January 04, 2014, 17:09:59 PM
One bit of helpful advice:-

Don't let the customer select a shipping method until they enter an address.

Check to see that the address array is not empty before showing the delivery options
Title: Re: Checkout by stages
Post by: marky76 on January 14, 2014, 21:37:39 PM
Hello everybody,
great job rijojoy :) This is exactly what I´m looking for. Can you pls explain your changes.. A view hints or even more..  ;)
kind regards
Title: Re: Checkout by stages
Post by: panat on March 19, 2014, 16:03:46 PM
Hello Everybody,

Yes, rijojoy, This is exactly what I'm looking for. It could be great if you explain the way you get it.
- Installation of additional modules ?
- Sample of default.php in the template's cart folder
- Something else ?

Thanks in advance
Title: Re: Checkout by stages
Post by: froston on November 04, 2016, 20:34:48 PM
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')