Wishlist Updating when deleting, Wishlist quantity

  • Posts: 24
  • Thank you received: 0
8 years 3 weeks ago #233839

Thank you. Please let me explain better.
Wishlist:
When quanitity go to 0, it removes product from wishlist.
When a customer purchase from wishlist, or I decrease quantity in backend, it removes product. From both back-end and front-end.

This started after the last update. The only code I touched was:
In topic # 202494 (item#2), you had given me code to update the wishlists if a product is unpublished.

Please advise, can I give you login?

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

  • Posts: 13201
  • Thank you received: 2322
8 years 3 weeks ago #233900

Hi,

Yes, you can send the informations via our contact form with a link to this topic in your message.
www.hikashop.com/support/contact-us.html

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

  • Posts: 24
  • Thank you received: 0
8 years 3 weeks ago #233941

Thank you! I sent login info.

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

  • Posts: 13201
  • Thank you received: 2322
8 years 3 weeks ago #234060

Hi,

I see that you have a view override on the view "cart / showcart".
Could you try to back it up and remove the override to use the default view code ?

If that does not solve the issue, I will do deeper tests and debugs.

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

  • Posts: 24
  • Thank you received: 0
8 years 3 weeks ago #234082

The override is removed. The issue is still there.

Remember, The only code I touched was:
In topic # 202494 (item#2), you had given me code to update the wishlists if a product is unpublished.

Thank you!

Last edit: 8 years 3 weeks ago by JennyCo.

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

  • Posts: 13201
  • Thank you received: 2322
8 years 3 weeks ago #234150

Hi,

I edited some code on your site to display the correct cart quantity when a product has been bought by another customer.
But I don't see code which not display the item if its quantity is set to 0.

So instead of delete the item in backend, you should just edit its quantity to 0.

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

  • Posts: 24
  • Thank you received: 0
8 years 3 weeks ago #234195

We don't delete. We set quantity to zero and the system deletes it.

Example:
Liz Wishlist has apples, oranges and bananas.
Someone comes into the store and buys her apples. So now Tara, the store owner, goes into website to put quantity to zero. Then, the system deletes the apples from Liz Wishlist. Now no one can see she got apples.

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

  • Posts: 13201
  • Thank you received: 2322
8 years 3 weeks ago #234212

Hi,

So in this case if "someone" buy apples from Liz wishlist and confirm his order, so the quantity will automatically be decreased in the wishlist. No need to change anything in backend.

I will still do further tests on my local for this issue.

The following user(s) said Thank You: JennyCo

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

  • Posts: 24
  • Thank you received: 0
8 years 3 weeks ago #234292

Ok, the issue was when someone purchased inside the store, not the website. If the store owner puts quantity to zero on backend, hikashop deletes the item. However, it appears to not delete if the quantity is set to zero on the frontend.

EDIT: I had to put back the original file for the to work.... In components/com_hikashop/views/cart/view.html.php. There was an edit you had given me that was causing the delete issue in topic # 202494 (item#2).

So, we will continue to test and hopefully that issue doesn't return.

Thank for your time and effort, we appreciate it.

Last edit: 8 years 2 weeks ago by JennyCo. Reason: Found that zero quantity was still deleting items from wishlist

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

  • Posts: 24
  • Thank you received: 0
8 years 2 days ago #236934

Hello,

I have updated HikaShop to the latest version and unpublished items are showing in my wishlist. The code you provided previously worked, now that code does not work.

Please provide code to not show unpublished items on the wishlist frontend. And, where do I put that code in?

Thank you!

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

  • Posts: 13201
  • Thank you received: 2322
7 years 11 months ago #237071

Hi,

You can edit the view "cart / showcart" and add the following code at the top:

<?php
		// Don't display unpublished products.
		foreach($this->rows as $k => $row){
			if(!$row->product_published)
				unset($this->rows[$k]);
		}

		// Get the new total price
		$this->total=new stdClass();
		$currencyClass = hikashop_get('class.currency');
		$currency_id = hikashop_getCurrency();
		$currencyClass->calculateTotal($rows,$this->total,$currency_id);
?>

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

Time to create page: 0.085 seconds
Powered by Kunena Forum