Jump to content

Setting a product status to New


Recommended Posts

How can I set the status of a product to NEW and over rule the preference of days set in the options?

 

I want my client to be able to display the New tag by selecting an option within the product itself.

 

Anyone have any ideas?

 

Thanks

 

Lee

Link to comment
Share on other sites

  • 2 weeks later...
  • 6 months later...
  • 1 month later...

I've taken Eck!'s plugin "Order Options" and modified it for setting specific products as new.

 

So, here's how:

 

1. Copy the attached file into your admin/tabs folder

2. Go to Administration => Menus => Add New

3. Enter "Set as New" as the name (or whatever..)

4. Enter "AdminSetNew" as the class

5. Select "Catalog" as the parent

6. Click Save

7. Go to Catalog/Set as New

8. Enter the reference number of a product you want to set as new

9. Click "Set Product as New"

 

 

Tested on 1.5.2

 

AdminSetNew.php

Edited by idofri (see edit history)
  • Like 4
Link to comment
Share on other sites

  • 4 months later...

hi idofri.

 

thanks, this is exactly what i was looking for BUT where is the "Tools" menu option that you refer to with "Tools/Tabs/Add New"?

 

i can't seem to find it in my admin cp.

 

i also don't know what the "Order Options" plugin is. do i need to add that in order to see the "Tools" menu option in BO? if so, where can i get the Order Options plugin?

 

thanks,

jez...

Edited by fixgear (see edit history)
Link to comment
Share on other sites

Hi,

 

The correct path is: Administration => Menus > Add New

 

"Order Options" was the original feature before I modified it, and if you'll follow my instructions you'll get a new menu-button called "Set Product as New" under the Catalog menu.

 

Cheers.

Link to comment
Share on other sites

Hi itemspet,

you want to display the product in the shop to be set a new or its condition?if you want to display .. find the belowings

you can try this, if you want to display the condition of the product in short description or more info or any other place in page you wantgo to theme directory and select product.tpl file and include this {$product->condition}. before that the condition of each product should be set. This may help you

Edited by karthik who_am_i (see edit history)
Link to comment
Share on other sites

hi all.

 

ok, after adding the new admin menu option to the catalogue menu, i am able to mark products as "NEW", very cool BUT...

 

aaaaaarrggghhhhh!!!

 

the ones i mark as new DO appear on the new products page (if you click on "All New Products" link below the thumbs) but the DO NOT appear as thumbs in the new product block on the fotter of all of my shop pages.

 

see attached screen capture "newblock.png"

 

yesterday i marked a shirt as new but it is not showing there :mellow:

 

any way to fix this/add it as a function?

 

thanks,

jez...

post-520279-0-58335600-1369075675_thumb.png

Edited by fixgear (see edit history)
Link to comment
Share on other sites

hi all.

 

update on my last post above. good news! the thumbs do appear in the new products block after all. not sure why but there was a delay but they are showing now.

 

see attached newBLOCK.png

 

saludos,

jer...

post-520279-0-16656500-1369748669_thumb.png

Link to comment
Share on other sites

  • 3 weeks later...
  • 3 weeks later...
  • 8 months later...
  • 1 month later...
  • 4 weeks later...
  • 5 weeks later...
  • 2 months later...

 

Great feature, Wondering how this can be implemented in PS1.6.  

Tried on PS1.6.0.9 and shows" Invalid security token" after I click on "set as new".  After that, seems works fine for now.

 

PS: if the product reference is entered wrongly, you get error. That's the only small issue it has.

Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...

Thanks for a great fix :)

 

Is it possible to use ID instead of Reference?

 

Also, it lookes like it is working with reference, and the product is set as new, but not the most recent. Does that make sense?

In my New products page, it is on page 2... (sorry there was a delay, it is working now :))

 

 

Using prestashop 1.5.6.2 :)

Edited by SaLiC (see edit history)
Link to comment
Share on other sites

  • 2 months later...
  • 3 weeks later...
  • 1 month later...
  • 3 weeks later...
  • 1 month later...
  • 1 month later...
  • 1 month later...

Hello,
I use Prestashop 1.6.1.1 (default theme).
I do not speak English, sorry.
The installation was successful and now have the menu "Set as New".
When I insert the ID of the product and save(new or old), it's ok, it does not give me error.
But then, in the front office, does not happen no change (i've cleared cache/force compile).

Is there any setting that can lock the operation?

is there some incompatibility with "virtual products" (without "warehouse")?

Is there any other setting to do?

Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...
  • 5 months later...
  • 2 weeks later...
  • 1 month later...

Hey guys... I've just tested the last version on prestashop 1.6.1.5 and despite the 2 errors bellow, it was working:

Notice on line 72 in file /home/mashenka/public_html/adminshop/tabs/AdminSetNew.php
[8] Undefined index: id_num


Notice on line 80 in file /home/mashenka/public_html/adminshop/tabs/AdminSetNew.php
[8] Undefined index: valid
 
So to get rig of the errors I've added 2 variable declarations to test for the $_POST.
I've attached the updated php file.
Let me know if it works for others as well.
 
P.S. this should be a standard setting for each product by default! Many shop owners disable specific products temporarily and when they enable them again they want their customers to see them as new products. So this is a must have feature IMHO.
Edited by dpcdpc11 (see edit history)
Link to comment
Share on other sites

  • 2 weeks later...
  • 2 months later...
  • 1 month later...
  • 4 weeks later...
  • 1 month later...

I get the following notices after installing the module. It appears to work correctly even with the notices.

 

Notice on line 387 in file /home/funsock1/public_html/store/tools/smarty/sysplugins/smarty_internal_templatebase.php(157) : eval()'d code
[8] Undefined index: ref_num

Notice on line 387 in file /home/funsock1/public_html/store/tools/smarty/sysplugins/smarty_internal_templatebase.php(157) : eval()'d code
[8] Undefined index: id_num

Notice on line 734 in file /home/funsock1/public_html/store/tools/smarty/sysplugins/smarty_internal_templatebase.php(157) : eval()'d code
[8] Undefined index: productstatus

Notice on line 734 in file /home/funsock1/public_html/store/tools/smarty/sysplugins/smarty_internal_templatebase.php(157) : eval()'d code
[8] Undefined index: productstatus

Edited by [email protected] (see edit history)
Link to comment
Share on other sites

I get the following notices after installing the module. It appears to work correctly even with the notices.

 

Notice on line 387 in file /home/funsock1/public_html/store/tools/smarty/sysplugins/smarty_internal_templatebase.php(157) : eval()'d code

[8] Undefined index: ref_num

 

Notice on line 387 in file /home/funsock1/public_html/store/tools/smarty/sysplugins/smarty_internal_templatebase.php(157) : eval()'d code

[8] Undefined index: id_num

 

Notice on line 734 in file /home/funsock1/public_html/store/tools/smarty/sysplugins/smarty_internal_templatebase.php(157) : eval()'d code

[8] Undefined index: productstatus

 

Notice on line 734 in file /home/funsock1/public_html/store/tools/smarty/sysplugins/smarty_internal_templatebase.php(157) : eval()'d code

[8] Undefined index: productstatus

 

Do not worry about the notices. You see them because you have debug mode on. I will fix them anyway when I have some time, but they do not affect the operation of the module. 

Link to comment
Share on other sites

  • 2 months later...

We made a module that allows to get more control on the new status : https://addons.prestashop.com/en/administrative-tools/26430-new-products-management-mark-products-as-novelties.html

 

This module adds a product tab that allows to set the date until which products has to be considered as "new".

The module configuration permits to choose if the PrestaShop native behavior has to kept (products will be considered as new if they had been added less than X days ago OR if a date has been set whithin the module) or not (for example if you don't want some products like minor accessories to be displayed as new).

Edited by SmartPlugs (see edit history)
Link to comment
Share on other sites

  • 4 weeks later...
  • 3 months later...
  • 1 month later...
  • 8 months later...

Hi Hstom,

Yes we will.
Actually the main code was working but :

  • We get some issues with dnd JS plugin that allows to order new products
  • We also would like to be able to send errors in BO product tab when we need to (and we still struggle with that...)

We can't recommand to install it on PS 1.7 until we solve this.

Yann

 

 

Link to comment
Share on other sites

12 hours ago, SmartPlugs said:

Hi Hstom,

Yes we will.
Actually the main code was working but :

  • We get some issues with dnd JS plugin that allows to order new products
  • We also would like to be able to send errors in BO product tab when we need to (and we still struggle with that...)

We can't recommand to install it on PS 1.7 until we solve this.

Yann

 

 

 

Ok, looking forward an official v1.7 version!

 

With kind regards,

 - Johan.

Link to comment
Share on other sites

  • 8 months later...

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...