Can a mailing list signup be added to registration using Custom Fields?

  • Posts: 31
  • Thank you received: 2
3 years 7 months ago #331356

-- HikaShop version -- : 4.4.1
-- Joomla version -- : 3.9.25
-- PHP version -- : 7.3

NOTE: I made a mistake in the title. I'm looking to add it to checkout, not registration.

I'd like to add a "Join our mailing list" checkbox at the end of the checkout, immediately preceding the finish/checkout button.

I know I can add a custom field in the order table, but that's not quite appropriate since the data really belongs in the user table. However if the field is added to the user table, is there a way to get it to appear during checkout? Perhaps a customized override of the checkout page, but I'm hesitant to do that.

I'd appreciate any suggestions. Thank you!

Last edit: 3 years 7 months ago by sixdeuces.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
3 years 7 months ago #331357

Hi,

If you use a custom field of the table "user" it will appear on the checkout if the user isn't already logged in since he will get the registration form.
So that might be ok.
Otherwise, you could have both a custom user field (for storing the data) and a custom order field (for display on the checkout), and then use a massaction with a trigger "onAfterOrderCreate and an action "update the values" on the custom user field column in "operation mode" with the value order.xxx (with xxx being the custom order field column name).
That way, the value of the custom order field would be copied to the custom user field after each order.

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

Time to create page: 0.052 seconds
Powered by Kunena Forum