Idea For A Mod

Maybe if I suggest it then someone will build it!

I while back managed to sort out the - In stock yes/no mod - and with options which involved editing some template and js script template - but I hardly knew what I was doing and essentially had a friend help me.

The start point for this mod was the forum and I also found a mod mentioned to combine a message using the stock level but again this was not for a product with options and was separate from the yes/no mod.

I keep on seeing situations where I could use this nicely for different things.

It might be easy but I have not wanted to go delving in there again with my currently limited time and flakey knowledge.

So the idea would be …

The stock level is used to display a message rather than a number provided the stock level is above - say a million - and for this to work with product options.

Where this is the case the add to cart button is disabled/ignored.

This should be able to be combined with the yes/no mod.

The message displayed should really be set by a language variable so that it can be easily altered.

(I know the yes/no mod that “I” did had the YES NO set in the templates and because of the js bit this had to be done in more than one place - not ideal)

Then by setting the stock level to 1,000,001 I could display one custom message and 1.000,002 another custom message etc.

Messages that I might use it for.

Stock due in 1 week

Stock due in 2 weeks

Please ring for our latest price

Price match item - please ring

Stock available from late August

This item is now discontinued

This colour is now discontinued

Please ring for an availability

Custom make on this option - please ring to discuss your requirements.

Etc etc.

This doesn’t sound like a “mod”, per se. It’s really just a matter of adding lines to the template, such as (sorry if i have my variable name wrong; you can see which ones are available by enabling the smarty template console).

{if $product.amount == 1000001}
message 1
{elseif $product.amount == 1000002}
message 2

It might be a better solution to utilize the manufacturer or supplier addons to pass custom messages, that way your stock counts are accurate and you can track inventory. Then it would be a matter of {if $product.supplier==‘whatever’} or similar template code.

Again, I haven’t verified the variable names here, so please don’t consider the above as working code.

[quote name=‘allstarbooks’]This doesn’t sound like a “mod”, per se. It’s really just a matter of adding lines to the template.[/QUOTE]


One persons couple of lines is another’s big mod project!

You suggestion that it might be so easy means I shall look at it again. It has gone back into the queue.

But when I did the In Stock - yes/no mod and to get it working with product options it took a couple of days and that was with a programming mates help. Even though the end result was just a few lines of code.

Not sure if this will help, but I’m curious as to the final solution for this. Here’s my idea:

Is it currently possible to provide a notification on the product page that an item is out of stock?

If so, it seems that half the code is already there and adding some If/Thens (sorry if terminology is wrong. I’m not a programmer) to simply display a different text message based on the quantity, whose variable I’m not familiar with.

Yes it is.

Search for yes/no mod or something similar.