Adding days to attach serial plugin

  • Posts: 6
  • Thank you received: 0
8 years 11 months ago #202610

-- HikaShop version -- : 2.4.0
-- HikaSerial version -- : 1.9.1
-- Joomla version -- : 3.4.1
-- PHP version -- : 5.3.29
-- Browser(s) name and version -- : Chrome

Hello,

I wanted to add a certain number of days to the current date to display on an attached serial.

For example I have developed an image which is the voucher. This voucher will display the serial number, the order_created date and the expiry date. The expiry date should be the order_created date plus a set number of days.

Can someone help me with the syntax to add this date + days to the voucher image.

Thank you.

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

  • Posts: 26000
  • Thank you received: 4004
  • MODERATOR
8 years 11 months ago #202620

Hi,

How do you generate the vouchers ?
Because you can use the "coupon generator" with the setting which allow you yo set a number of validity days.
There is also the "time limited" generator which generates serials with an expiration date.

In both cases, it generate a end date that the plugin "attach serial" can access and display in the final image.
Otherwise, there is no actual setting in the "attach serial" plugin to perform an arithmetic operation.

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: 6
  • Thank you received: 0
8 years 11 months ago #202649

Thanks yes I am using the voucher to nominate an end date although I do not know what to call. For instance I use order_created to display the order date. What "field" should I call to display the expiry date?

Appreciate your response.

Thank you.

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

  • Posts: 26000
  • Thank you received: 4004
  • MODERATOR
8 years 11 months ago #202655

Hi,

Can you please provide us more details ?
You do not explained how you generate the vouchers, so I'm still not able to provide you an answer.

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: 28
  • Thank you received: 0
8 years 8 months ago #211673

I have the same question.
I want to display the expiry date for generated image coupon using attach to email.
Something like this in Generated Text.

{order_product.order_product_expiry}
I don't know the code for expiry date. Or the code for order date + 365 days.

The Gift Certificate expires 1 year after purchase, so I want to put a message on the generated image with the expiry date. It would be unique per order, example "This Gift certificate expires on 2015-01-30"

Also the QR code should be a URL which adds the Coupon Code to the order, how do I do that? something like {order_product.order_product_serial}

Last edit: 8 years 8 months ago by terryt. Reason: coupon code

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

  • Posts: 26000
  • Thank you received: 4004
  • MODERATOR
8 years 8 months ago #211693

Hi,

The information is stored in the serial "extra data" with the key "discount_end".
The data is a timestamp, which means that you need to use the format "date" to display it

serial.extradata.discount_end

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: 2
  • Thank you received: 0
4 years 2 months ago #315730

Hi,

I am making use of the "time limited" generator which generates serials with an expiration date, which I believe is is stored in serialdata validity_end. I made use serial.extradata.validity_end as seen in the attached image but it doesn't displays the date. The serial data and assigned dates are both working correctly .

.

Please assist!

Attachments:

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

  • Posts: 26000
  • Thank you received: 4004
  • MODERATOR
4 years 2 months ago #315740

Hello,

serial.extradata.discount_end
Is the code to access the value ; you can use that string if you do use "dynamic text".
But if you do use "Serial..." then you're already in the "serial" object so you do not need to specify it in the text field.
CF : www.hikashop.com/forum/14-hikaserial/892...html?start=20#280180

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: 2
  • Thank you received: 0
4 years 2 months ago #315741

It works. Thanks.

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

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