VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: lostmail on January 17, 2021, 11:48:34 AM

Title: SOLVED Products not available - notify me - availability image
Post by: lostmail on January 17, 2021, 11:48:34 AM
Hi,
when a product is not available I`missing the function that the availabilty image changes to....."on order" or whatever is set.

The image is only active when customers can order products not in stock

But we need this function even for products which are not in stock and not to be ordered. (notify me)
Title: Re: Products not available - notify me - availability image
Post by: lostmail on January 17, 2021, 15:41:58 PM
Another example here:

Product in stock - no availibility image is visible but in backend the article has "24 hours".
Product not in stock - availibility image is visible (but it is not in stock !) notify me.

Title: Re: Products not available - notify me - availability image
Post by: sirius on January 17, 2021, 17:05:28 PM
Hi
Can't reproduce the issue
did you set a date for availability ?
did you try without checking "Stock handling on product level" ?
Title: Re: Products not available - notify me - availability image
Post by: lostmail on January 18, 2021, 07:40:51 AM
Hi,
Yes - I set in all producst a date for availibility.
But it is not to see in frontend.

If a product is out of stock - the availibility from the product set is visible and "notify me".

But it should work like:
Availibility (24 hours or what is set in products) should be visible for all products.
If no stock => "notify me button" + image "not available" should be visible. (setting in backend attached).

I think my setting is correct in backend but it`s not working like that in frontend.
Title: Re: Products not available - notify me - availability image
Post by: sirius on January 18, 2021, 09:38:31 AM
ok
but did you try without checking "Stock handling on product level" ?
Title: Re: Products not available - notify me - availability image
Post by: Jörgen on January 18, 2021, 09:40:28 AM
I agree with sirius, this setting costs performance and makes it possible to set and reset this for every product. This setting makes the setting unique to every product.

Jörgen
Title: Re: Products not available - notify me - availability image
Post by: lostmail on January 18, 2021, 10:33:09 AM
Yes - i tried out "Stock handling on product level".

Products in stock:

availibility set to "24 hours" for each product => no image visible in Frontend.

Product out of stock:

I tried out all settings.
But a product which is not available never changes to the availability image which is set here:
"Products Out of Stock are orderable, and the field 'Availability' below is displayed" => Availibility image is not changing...
###
What I need is:
All products should show the availibility image which is set in Product Details.
STOCK HANDLONG:
"Products Out of Stock are not orderable AND Displays 'Notify Me' instead of 'Add To Cart' button , AND the field 'Availability' below is displayed"

Title: Re: Products not available - notify me - availability image
Post by: lostmail on January 18, 2021, 10:35:00 AM
Quote from: sirius on January 18, 2021, 09:38:31 AM
ok
but did you try without checking "Stock handling on product level" ?

Ähm - i can only activate a checkbox but where is the special stock handling configured ?

OK - found it in product details...but at las I need the global configuration like i wrote before...for all products...

What I need is:
All products should show the availibility image which is set in Product Details.
STOCK HANDLING for ALL PRODUCTS:
"Products Out of Stock are not orderable AND Displays 'Notify Me' instead of 'Add To Cart' button , AND the field 'Availability' below is displayed"
Title: Re: Products not available - notify me - availability image
Post by: Jörgen on January 18, 2021, 10:40:01 AM
If You tick "on stock level" You have to configure this for EVERY product. Otherwise it becomes a global setting.

Jörgen
Title: Re: Products not available - notify me - availability image
Post by: lostmail on January 18, 2021, 10:50:28 AM
Quote from: Jörgen on January 18, 2021, 10:40:01 AM
If You tick "on stock level" You have to configure this for EVERY product. Otherwise it becomes a global setting.

Jörgen

OK - thank you...found it and deactivated that....don`t need special handling for each product.

The global setting should be:

All products should show the availibility image which is set in Product Details; or no image if empty (I use it as "delivery time" informaton for customer)

STOCK HANDLING for ALL PRODUCTS out of stock:
"Products Out of Stock are not orderable AND Displays 'Notify Me' instead of 'Add To Cart' button , AND the field 'Availability' below is displayed"
Title: Re: Products not available - notify me - availability image
Post by: lostmail on January 18, 2021, 10:59:02 AM
It seems, that the availibility set in product always overrides the image which is set in global configuration "Products Out of Stock are orderable, and the field 'Availability' below is displayed " even when "Stockhandling on product level " is not activated.
Title: Re: Products not available - notify me - availability image
Post by: Jörgen on January 18, 2021, 11:05:39 AM
Tested with Protostar ? This can be a template issue..

Jörgen

Title: Re: Products not available - notify me - availability image
Post by: lostmail on January 18, 2021, 11:56:49 AM
No with Olympiathemes HORME3 PRO.

But when i deactivated all VM overrides it`s the same result...
Title: Re: Products not available - notify me - availability image
Post by: lostmail on January 21, 2021, 08:59:01 AM
Availibility image in products are only used if prodcut is not in stock and when it is set it overrides the availibility image which is set in "Products Out of Stock are orderable, and the field 'Availability' below is displayed"

Right ?

At last i wanted to use the availibility image as "delivery time" in every product in stock.

QuoteWhen a product is out of stock than there is missing the option in configuration/shopfront:

"Products Out of Stock are not orderable AND Displays 'Notify Me' instead of 'Add To Cart' button , AND the field 'Availability' below is displayed"
Title: Re: Products not available - notify me - availability image
Post by: lostmail on January 21, 2021, 10:08:50 AM
OK - found asolution which works for me:

Changed in override stockhandle.php this line:

Quoteif (($product->product_in_stock - $product->product_ordered) < 1) {

to

Quoteif (($product->product_in_stock - $product->product_ordered) > 0) {

and set in configuration "Notify me when available".