Auto Increase the Quantity and Auto next on Addres

  • Posts: 25
  • Thank you received: 0
8 years 5 months ago #243380

-- HikaShop version -- : 3.6
-- Joomla version -- : 3.5.2
-- PHP version -- : 5.4
-- Browser(s) name and version -- : Chrone
-- Error-message(debug-mod must be tuned on) -- : twi good questions

Hi i have twwo questions:

1) I have change the product quantity to dropdown box (selector), i would like that when i change the nnumer for example from 1 to 2 or 3 auto update the prices and everything without need to click in the undate button is thata posible???

2) the second question is abou guess buy in address i have two step check out flow in the firs i ask by address and in the second i request other things in the custo fields (order fields) but i have to click next twice the first to add the addres and the other to continue would be possible to simplifly that and save the addres and continue with the same click in the next button ???

Please Log in or Create an account to join the conversation.

  • Posts: 82906
  • Thank you received: 13378
  • MODERATOR
8 years 5 months ago #243384

Hi,

1. There is no option to do that.
But you could add an onchange on the select field to auto submit.
So supposing that you're talking about the cart view of the checkout, you could try changing the code:

echo JHTML::_('select.genericlist', $values, 'item['.$row->cart_product_id.']', '', 'value', 'text', $row->cart_product_quantity,'hikashop_checkout_quantity_'.$row->cart_product_id);
to:
echo JHTML::_('select.genericlist', $values, 'item['.$row->cart_product_id.']', 'onchange="this.form.submit();"', 'value', 'text', $row->cart_product_quantity,'hikashop_checkout_quantity_'.$row->cart_product_id);
in the file "cart" of the view "checkout" via the menu Display>Views.

2. You would have to remove the "return false;" lines in the code:
if($shipping!=$oldShippingAddress){
			//if the cart doesn't need a shipping address, don't care about the shipping check result
			$cart = $this->initCart();
			if($cart->has_shipping){

				$this->cart_update=true;
				if(strpos($this->checkout_workflow,'shipping')!==false){
					$this->before_shipping(true);
				}
				if(strpos($this->checkout_workflow,'payment')!==false){
					$this->before_payment(true);
				}
				return false;
			}
		}
		if($billing!=$oldBillingAddress){
			return false;
		}
of the file components/com_hikashop/controllers/address.php

Please Log in or Create an account to join the conversation.

  • Posts: 25
  • Thank you received: 0
8 years 5 months ago #243415

Hi thanks the first advice worked great, but the second one i did no find the line XD

Please Log in or Create an account to join the conversation.

  • Posts: 82906
  • Thank you received: 13378
  • MODERATOR
8 years 5 months ago #243424

Hi,

You can find that code in the after_address function of that file.
It might be a bit different as you're not using the latest version, but it should be quite similar and the principle of removing the "return false;" lines there is still the same.

Please Log in or Create an account to join the conversation.

Time to create page: 0.062 seconds
Powered by Kunena Forum