Incorrect product value for product_min_per_order in wishlist view

  • Posts: 257
  • Thank you received: 2
  • Hikashop Business
11 months 1 week ago #296494

-- HikaShop version -- : 3.5.1
-- Joomla version -- : 3.8.11
-- PHP version -- : 7.2

We have made a change to layouts/quantity.php view to add or remove multiple quantities of the minimum order amount. Under the cart the view the product_min_per_order has the correct value. Some product in the wishlist and the product_min_per_order is always 1. All other values are identical. See attachments

Attachments:

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

  • Posts: 66308
  • Thank you received: 9733
  • MODERATOR
11 months 1 week ago #296521

Hi,

Yes. This is done on purpose in the file "cart/show.php" with the code:

		if($this->cart->cart_type == 'wishlist') {
			$this->row->product_min_per_order = 1;
			$this->row->product_max_per_order = 0;
		}
That way, customers can still wish to have more products.
For example, on a wedding gift list, you might want 50 items of a product while the product can only be purchased with 10 items per order. But several persons invited to your wedding will be able to purchase the product and each one will have the 10 items limit. In the end, you will be able to reach more than 10 items purchased for you for that product but by different people.

If you try to convert a wishlist to a cart or move a product from a wishlist to a cart, it will block to the limit or refuse so it won't be possible to try to cheat by first moving the product through a wishlist (at least it shouldn't).

Anyways, if you don't want that, just remove that code in a view override and you should be set :)

The following user(s) said Thank You: jameswadsworth

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

  • Posts: 257
  • Thank you received: 2
  • Hikashop Business
10 months 3 weeks ago #297271

We'll see if we can sort this with an override so that the wishlist quantities behave like cart quantities. Thanks

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

  • Posts: 257
  • Thank you received: 2
  • Hikashop Business
9 months 1 week ago #299021

We have been messing around with the quantity inputs and we are difficulty with one thing in HikaShop 3.5.1

We cannot get the quantity input in the cart to show as 'show_default'. It always comes out as 'show_simple'. What are we doing wrong? No matter what value we set under configuration or the 'category input method', it always comes out as 'show_simple'. We want to restrict users to buying multiples of the minimum order, which we have done by modifying layouts/quantity.php file as necessary.

The only we can get it work is by manually defining $quantityLayout = 'show_default'; in the custom ayouts/quantity.php file that we have created as an override. However I think we are missing some setting somewhere.

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

  • Posts: 66308
  • Thank you received: 9733
  • MODERATOR
9 months 5 days ago #299043

Hi,

The cart is displayed in different ways in several different places (checkout, cart module, cart manager of the user control panel).
I'm not sure which one you're refering.
Could you provide more details on the situation so that we can have a better grasp of the situation ?

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

  • Posts: 257
  • Thank you received: 2
  • Hikashop Business
9 months 5 days ago #299065

Apologies for being vague. We are taking about the cart module.

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

  • Posts: 66308
  • Thank you received: 9733
  • MODERATOR
9 months 5 days ago #299068

Hi,

In the cart module, we force the input field mode as some modes are not adapted to the cart module in most cases (the display of the input would be too big for the small space usually available for a cart module.
This is done with the code:

if(!in_array($this->quantityLayout, array('show_simple','show_select','show_select_price','show_none')))
			$this->quantityLayout = 'show_simple';
in the file "cart" of the view "product" which displays the cart module.
If you don't want that, you can remove that piece of code (or adapt it).

The following user(s) said Thank You: jameswadsworth

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

Time to create page: 0.073 seconds
Powered by Kunena Forum