News:

Looking for documentation? Take a look on our wiki

Main Menu

Shipment and Payment choice ONLY WHEN REGISTERED

Started by logobis, May 01, 2013, 08:59:40 AM

Previous topic - Next topic

logobis

Hi,

Using Joomla 2.5.11 and VM 2.0.20b.
I'm looking for a meaning to display shipment and payment choices only when customer is registered.
Actually, if not, on the cart panel, the customer show the text "select a shipment method" / "select a payment method" and when clicking is redirected on a page "sorry the selected method...."...that is not good !
So, I wish this 2 text should be displayed only when the customer is registered....
Does someone have this solution ?
(just a code in defaut_pricelist.php....if (customer registered) then ....).
Thank's

K&K media production

if($this->cart->userdetails->virtuemart_user_id != 0) {

}


this should be work, but if you allow checkout as guest, it is better to look if in address country is not empty (if your shipment is country based)

if(!empty($this->cart->BT['virtuemart_country_id'])) {

}