Group Options with Product + Payment restriction

  • Posts: 241
  • Thank you received: 5
11 years 3 months ago #124601

-- HikaShop version -- : 2.2.1

I love many of the new features in 2.2.1. Thank you.

I am trying to restrict people from purchasing more than one item at a time. I have "Group Options with Product" set to "Yes" in my configuration which causes some problems with the product quantity.

For example if I set the System>Payment Methods>Authorize>Restrictions>"Maximum Quantity" = 1 on a product with a option, it will not display.

For example, this product will not display if "maximum quantity" = 1.
www.wodrocket.com/index.php?option=com_h...ct&task=show&cid=356

Is there any solutions to work around this?... I know it would be easy to set it to "maximum quantity" = 2, but that wont work for this product:
www.wodrocket.com/index.php?option=com_h...ct&task=show&cid=493

Again, in my mind, both of these are just ONE product with features attached, but the system sees them as quantity > 1.

Thanks.

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

  • Posts: 26165
  • Thank you received: 4029
  • MODERATOR
11 years 3 months ago #124734

Hi,

You are right.
When the payment/shipping system is processing the cart, it counts the products' options too.
In HikaShop you can say that the options are put separately in the cart or displayed with the main product.
We can improve the algorithms but we have to add a specific option, because your case is logical, but the contrary is logical too. Someone could want to limit the total number of products, options included.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 241
  • Thank you received: 5
11 years 3 months ago #124790

Ok that makes sense. Is there anything I can do currently to limit to "one product"?

many thanks.

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

  • Posts: 13201
  • Thank you received: 2322
11 years 2 months ago #124823

Hi,

I think that you will have to create a little plugin which will change the value "total_quantity" in the "order" object depending on the products in the order, if the products are or not an option.
To know if the product is an option, it have the value "cart_product_option_parent_id".

The function to use in the plugin is: onShippingDisplay(&$order,&$methods,&$usable_methods,&$messages)
www.hikashop.com/support/documentation/6...tation.html#shipping

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

Time to create page: 0.073 seconds
Powered by Kunena Forum