How to display content of discount.discount_code

  • Posts: 7
  • Thank you received: 0
  • Hikaserial Standard
1 year 5 months ago #313220

Hi there,
we are trying to display the content of the following database field "discount.discount_code" on a coupon. We used "Dynamic text and added the following code {discount.discount_code} but this seems not to work. Any suggestions how to solve this?

Kind regards
Alex

Last edit: 1 year 5 months ago by Aqualon.

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

  • Posts: 24861
  • Thank you received: 3828
  • MODERATOR
1 year 5 months ago #313232

Hello,

If that code is coming from the serial, you can just use the serial data.
If you want to get the code frmo the order, you can use the "order_discount_code" value.
Don't hesitate to use the dropdowns at the bottom of the editor to help you to know which fields are available.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 7
  • Thank you received: 0
  • Hikaserial Standard
1 year 5 months ago #313255

Hi Jerome,
first of all thank you for your answer. I know the dropdown fields and we allready use them to display order and serial data. In this case this does not help.

We use a percentage discount on one product per month. We want and need to print this (discount info) on the coupon. In this case there is no order_discount_code in the order table of the db. This value (name of the discount) is stored in the discount table -> discount_code. Any suggestions how to get this value on the coupon?

Kind regards
Alex

Last edit: 1 year 5 months ago by Aqualon.

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

  • Posts: 72763
  • Thank you received: 11096
  • MODERATOR
1 year 5 months ago #313259

Hi,

The information of which discount was used on which product of an order is not stored in the database.
So be able to do that would require to add new columns to the hikashop_order_product table and modify the code creating the order to add the information there.
If necessary, it could be done as a custom plugin if you need a developer to work on that for you.
Or we could also work on that for you and include that directly in HikaShop. If interested, you can use our contact form and request a quote: www.hikashop.com/support/contact-us.html
Make sure you include a link to this thread in your message.

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

Moderators: Obsidev
Time to create page: 0.061 seconds
Powered by Kunena Forum