News:

Looking for documentation? Take a look on our wiki

Main Menu

Checkout message in the system message position

Started by Lorrein, August 31, 2012, 15:55:35 PM

Previous topic - Next topic

Lorrein

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



ivus

Hi Lorrein,

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

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.

Lorrein