Jump to content

$product.new gives error "Undefined index: new" when used in module


Recommended Posts

Hi guys,

 

Have bought "Module Related Products Simple PS 1.5" and have contacted the developer in regards to this but thought to check here also and see if anyone can point me in the right direction.

 

The module doesn't support by default to show if the product is new or not, and I would like to ad that but when trying to get it from $product.new it just says it is undefined.

 

Although all others seem to work and return values. So I've temporary solved it with this:

{if $product.date_add|date_format:"%y/%m/%d" >= strtotime('-7 days')|date_format:"%y/%m/%d"}

To match the settings in admin for how long a product is considered new....but this is rather ugly(?).

 

Any ideas?

 

Thanks in advanced!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...