VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: Lorrein on August 31, 2012, 15:55:35 PM

Title: Checkout message in the system message position
Post by: Lorrein on August 31, 2012, 15:55:35 PM
Hi,

I have created a message informing customers to start of with entering a Bill To address and put it in default.php (yes with an override).

<?php if (empty($this->cart->BT)){ ?>
<img alt="Attention" src="/images/joomla/red.png" />
<?php echo JText::_ ('COM_VIRTUEMART_CART_NO_Bill_To'); ?><br/><?php }?>

However this message isn't displayed at the system message location in the system message format (like the message when  the TOS tick box isn't ticked). How do I do that?

I need this because the available shipping methods depend on the shipping location. So customers should first enter a Bill to Address
I haven't found a solution yet where the shipping options are only available when a Bill To address is entered.


thanx
Arthur


Title: Re: Checkout message in the system message position
Post by: ivus on August 31, 2012, 21:18:39 PM
Hi Lorrein,

What you want to do is generate a Joomla! system message.

http://docs.joomla.org/Display_error_messages_and_notices (http://docs.joomla.org/Display_error_messages_and_notices)

However, be aware that the message will not show on the current page it gets fired on. It gets enqueued to display on the next page load...

You should really modify the shipping plugin for a BT check. This way the plugin does the checking all the way through to the payment page.
Title: Re: Checkout message in the system message position
Post by: Lorrein on September 05, 2012, 08:52:23 AM
Thanks,

I will have a look at it.