2 checkout page menu

  • Posts: 129
  • Thank you received: 3
6 years 2 months ago #287861

-- HikaShop version -- : 3.2.1

hi,
I have two product(PA & PB)
I publish currency switcher module in checkout page.now I want show this module only when PA product in the cart for checkout.
how do it?
is it possibile define two diffrent menu for checkout page for per product?


Joomla Developer | contact [at] yool.ir

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

  • Posts: 12953
  • Thank you received: 1778
6 years 2 months ago #287864

Hello,

I publish currency switcher module in checkout page.now I want show this module only when PA product in the cart for checkout.
how do it?

There's no option to do it for the moment, so it will require some code customization of the currency switcher's module.

is it possibile define two diffrent menu for checkout page for per product?


We can only define one menu for the checkout page for the moment using the "Force a menu on the checkout" option, so it will also require some development.

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

  • Posts: 129
  • Thank you received: 3
6 years 2 months ago #287934

thanks.
please guide me to do it.(I publish currency switcher module in checkout page.now I want show this module only when PA product in the cart for checkout.)
so should be add if function in currency module ?
please send me shortcode for use If function . if (productid= XXX) {} .....
thanks


Joomla Developer | contact [at] yool.ir

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

  • Posts: 81539
  • Thank you received: 13069
  • MODERATOR
6 years 2 months ago #287937

Yes, you'll have to add that in the currency module view layout:
docs.joomla.org/Special:MyLanguage/J3.2:...r#Creating_Overrides
The code will be something like that:

$class = hikashop_get('class.cart');
$cart = $class->getFullCart();
$found = false;
foreach($cart->products as $product){
 if($product->product_id == 'XXX')
  $found = true;
}
if(!$found) return;

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

Time to create page: 0.071 seconds
Powered by Kunena Forum