Produit dupliqué désactivé par défaut ?

  • Posts: 473
  • Thank you received: 30
  • Hikashop Business
4 years 5 months ago #320993

-- HikaShop version -- : 4.3.0

Bonjour,

Est-il possible de faire en sortir que les produits copiés (depuis la liste des produits) soient désactivés par défaut ? Actuellement ils sont activés par défaut et c'est ennuyeux car il faut vite que j'aille les désactiver.

Last edit: 3 years 8 months ago by lesyeux. Reason: Résolu

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
4 years 5 months ago #320995

Bonjour,

Il n'y a pas d'option pour cela.
Vous pouvez faire cela en rajoutant la ligne:

$newProduct->product_published = 0;
après la ligne:
$newProduct->product_code = $this->template->product_code.'_copy'.rand();
dans le fichier administrator/components/com_hikashop/helpers/import.php
Notez que vous perdrez la modification lors des mises à jour HikaShop donc il faudra la refaire.

The following user(s) said Thank You: lesyeux

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

  • Posts: 473
  • Thank you received: 30
  • Hikashop Business
4 years 5 months ago #321034

Testé et approuvé. Ça va me simplifier la vie. Merci beaucoup.

Je suggère cependant que le comportement par défaut lors d'une copie de produit soit un produit non publié. Si on fait une copie, c'est pour créer un nouveau produit, donc le temps de le paramétrer et bien le vérifier, il n'y pas lieu de le publier. On est obligé de chercher la copie dans la liste puis de la désactiver. Certes, ce n'est pas long à faire, mais parfois, on oublie, et c'est un peu embêtant.

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

  • Posts: 2143
  • Thank you received: 747
4 years 1 month ago #324322

According to Google Translate:

lesyeux wrote: Tested and approved. It will make my life easier. Thank you very much.

I suggest, however, that the default behavior when copying a product is an unpublished product. If we make a copy, it is to create a new product, so the time to configure it and check it well, there is no need to publish it. We have to look for the copy in the list and then deactivate it. Admittedly, it does not take long to do, but sometimes we forget, and it is a bit annoying.


Hi,

I'm totally with @lesyeux, this is common sense, so here's a big "+1" from me, for whatever it's worth.
Just checked in 4.4.0, and it's "still missing" there.

Many thanks for making this the default asap.


Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )
The following user(s) said Thank You: lesyeux

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
4 years 1 month ago #324340

Hi,

Please note that there is already a hidden setting for this.
If you add an entry with the namekey unpublish_copy_by_default and the value 1 in the hikashop_config table via your PHPMyAdmin, the copied products will be unpublished by default.

Last edit: 4 years 1 month ago by nicolas.
The following user(s) said Thank You: lesyeux, lousyfool

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

  • Posts: 2143
  • Thank you received: 747
4 years 1 month ago #324343

nicolas wrote: Please note that there is already a hidden setting for this.


Hi,
And thanks for the info, Nicolas.

It's sure good to know -- if one knows, or stumbles over this here, and keeps his own list of these hidden gems...

Is there a (perhaps not so hidden) list of these hidden settings? Or are we really supposed to somehow find out and then maintain our own? Since you're posting them here every once in a while, they're obviously not really "secret" ;)

Thanks again.


Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
4 years 1 month ago #324347

Hi,

They aren't secret. But we don't have a list already compiled either.
I think we'll add an interface at some point to be able to change them. But not sure yet how it should look. The problem is that there are already way too many settings. So adding a couple dozen more is not something I'd like to have.

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

  • Posts: 2143
  • Thank you received: 747
4 years 1 month ago #324383

Hi Nicolas,

In the documentation here you have a section "Other Resources" (most if not all of which is hopelessly outdated). Other than a much needed clean-up there, I'd think that a link to a simple page with "Hidden settings" or whatever you want to call them would be well placed there. I reckon the page then could be just a simple table with 3 columns: namekey, value, brief description.


Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )
The following user(s) said Thank You: nicolas

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
4 years 1 month ago #324416

Hi,

That's indeed a really good idea. Thanks for your input on that !

The following user(s) said Thank You: lousyfool

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

  • Posts: 2143
  • Thank you received: 747
2 years 5 months ago #342182

nicolas wrote: That's indeed a really good idea. Thanks for your input on that !

Hi,

Sorry for "warming up" this old thread, but new hidden settings keep being added from time to time (like recently here ), and I'm wondering if by now a compiled list of these hidden settings exists and is publicly accessible... at least I can't find it anywhere, not here , and neither under "Other Resources", nor elsewhere.
Sure, not the most urgent thing, but really nice to have, obviously. Thank you!


Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
2 years 5 months ago #342185

Hi,

We've been working on an interface inside HikaShop which would allow you to edit the hidden settings. Nothing is out yet.

The following user(s) said Thank You: lousyfool

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

  • Posts: 2143
  • Thank you received: 747
2 years 5 months ago #342192

Thanks for your reply, Nicolas. Sounds good. Will keep eyes peeled for the changelog again. :blink:


Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )

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

Time to create page: 0.067 seconds
Powered by Kunena Forum