News:

Support the VirtueMart project and become a member

Main Menu

Virtuemart Checkout force user to register to allow gift coupon usage

Started by j45p41, September 06, 2014, 19:43:18 PM

Previous topic - Next topic

j45p41

I am using virtuemart 2.6.6 with Joomla 2.5.

I have added gift coupons for users and I want them to use this once when placing their first order. The problem is that when a user is not registered they will try to add the coupon code FREEDEL at site localbutler.co.uk but the one page checkout page first prompts them to add their details and then proceeds to confirm their order but not give the user an opportunity to add the code.

Is there any way that I can force users to register first and then automatically login before the page showing the cart item appears because when a user is previously registered the coupon works fine.

jenkinhill

Try enabling "Only registered users can checkout " in Config/Checkout.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

j45p41

Hi jenkinhill,

many thanks indeed for the reply, however I do have this option enabled - see attachment.

The funny things is that we were ready to launch until we decided to add free delivery code. Now the best option seems that we have users registered beforehand.

ideally the section crossed out should not appear and the user should be prompted to login, either as part of this page or an intermediate page.

[attachment cleanup by admin]

GJC Web Design

Your screen doesn't look like std VM - r u using a 3rd party checkout  (OPC)?
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

j45p41

I am using checkout from gavick.com template storefront.

However I managed to fix the issue by:

I managed to fix this issue.

I edited the cart php files and inserted the following code:

//JUMP ADDRESS CODE

$user = JFactory::getUser();
$status = $user->guest;

if($status == 1){
echo "not logged in";
goto out_a;
}
else
{
echo "logged in";

}   
?>
I know that using goto is not a great way of coding in php but it allowed me to jump over displaying the address fields when the user was not logged in.