- Posts: 4
- Thank you received: 0
Disable billing address for free products
10 years 2 months ago #246851
by wbobteng
Disable billing address for free products was created by wbobteng
-- HikaShop version -- : 2.6.3
-- Joomla version -- : 3.6.0
-- PHP version -- : 7.0.8
Hello,
Is there any way to disable billing address for free products only? I have tried like this:
components\com_hikashop\views\user\tmpl\registration.php
That code removing billing address parts from checkout page but when I am trying to get register it's showing this error:
Looks like I haven't implement it correctly. Any suggestion please?
Thanks
-- Joomla version -- : 3.6.0
-- PHP version -- : 7.0.8
Hello,
Is there any way to disable billing address for free products only? I have tried like this:
components\com_hikashop\views\user\tmpl\registration.php
Code:
$cartClass = hikashop_get('class.cart');
$cart = $cartClass->loadFullCart();
if($cart->full_total->prices[0]->price_value == 0){
$this->config->set('address_on_registration',0);
}
Code:
Error
Please complete the Title field
Please complete the First name field
Please complete the Last name field
Please complete the Address field
Please complete the City field
Please complete the Telephone field
Thanks
Please Log in or Create an account to join the conversation.
10 years 2 months ago - 10 years 2 months ago #246853
by wbobteng
Replied by wbobteng on topic Disable billing address for free products
Tried this ways too. disable "Ask address on registration" from configuration. Edited this file: components\com_hikashop\views\checkout\tmpl\address.php
at very top before this line:
bellow lines:
but now giving this error:
Any better idea?
at very top before this line:
Code:
if($this->identified) {
Code:
$cartClass = hikashop_get('class.cart');
$cart = $cartClass->loadFullCart();
if($cart->full_total->prices[0]->price_value == 0){
$this->identified = 0;
}
Code:
Message
Please create or select an address
Last edit: 10 years 2 months ago by wbobteng.
Please Log in or Create an account to join the conversation.
10 years 2 months ago #246858
by nicolas
Replied by nicolas on topic Disable billing address for free products
Hi,
I don't see a way to do it without having to hack the function "after_address" of the file components/com_hikashop/controllers/checkout.php which checks that you have an address entered if you have the "address" view in the "checkout workflow" setting of the HikaShop configuration.
I don't see a way to do it without having to hack the function "after_address" of the file components/com_hikashop/controllers/checkout.php which checks that you have an address entered if you have the "address" view in the "checkout workflow" setting of the HikaShop configuration.
Please Log in or Create an account to join the conversation.
Time to create page: 0.193 seconds