Feature Request: Generate Serials only for defined shipping methods

  • Posts: 58
  • Thank you received: 6
  • Hikaserial Subscription Hikashop Business
2 weeks 6 days ago #372744

-- HikaShop version -- : 6.5.2
-- HikaSerial version -- : 6.1.1
-- Joomla version -- : 6.1.2
-- PHP version -- : 8.4.23
-- Browser(s) name and version -- : FF 152.0.9

Hello. I bought Serials just over two years ago and tried to set it up for my ticket shop. At the time, I ran into difficulties with this feature request, which I submitted around 20 months ago. As a result, I am unable to use Serials for its most important function: the delivery method ‘Send by email’. As I explained at the time, it’s unfortunately not a solution for me that the serials can be ordered via a different product variant; instead, the serials should only be generated when the customer selects a specific delivery method. It’s extremely frustrating for me that this isn’t possible.

I would like to ask you once again to implement this feature in HikaSerial. I upgraded my subscription yesterday – please see this as a financial incentive to ensure this feature is added.

I would appreciate a response. Thank you.

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

  • Posts: 26380
  • Thank you received: 4075
  • MODERATOR
2 weeks 6 days ago #372745

Hello,

HikaSerial 6.1.0 introduced new triggers : "onCustomAttachSerialRule" and "onDisplayCustomAttachSerialOptions".

The first trigger allows to add a new custom rule and be able to not attach the serial in an email.
The second one allows the creation of new settings which will be displayed in the plugin config page (the HikaSerial one).

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: 58
  • Thank you received: 6
  • Hikaserial Subscription Hikashop Business
2 weeks 6 days ago #372750

Jerome wrote: Hello,

HikaSerial 6.1.0 introduced new triggers : "onCustomAttachSerialRule" and "onDisplayCustomAttachSerialOptions".

The first trigger allows to add a new custom rule and be able to not attach the serial in an email.
The second one allows the creation of new settings which will be displayed in the plugin config page (the HikaSerial one).

Regards,

Thanks for pointing that out. Unfortunately, I’m not yet sure how to use these two functions. Where can I find some documentation, and what do I need to do?

Could you help me with this or provide an example?

Last edit: 2 weeks 6 days ago by P.M..

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

  • Posts: 26380
  • Thank you received: 4075
  • MODERATOR
2 weeks 6 days ago #372751

Hello,

After my last message, I started to work on an update of the developer documentation page.
www.hikashop.com/support/documentation/1...ncustompdfserialrule

You will find the function definition with the parameters.
Full examples are not yet available for all the existing triggers but it should help you for the start.

Regarding the second trigger, the idea of the trigger (like the other "additional settings"), is to let the plugin display (echo) its HTML content.
The first parameter gives the needed information regarding the "name" of the input.
To understand how you can integrate, best is to take a look at the view itself (where the trigger is called), directly within the plugin folder.

But for your case, you might not need the second trigger ; just the first one could be suffisent if you want to apply the behavior on every orders depending on the shipping method.
The "$params" variable contains the HikaShop order object (directly provided by HikaShop) ; and you should be able to read the information you need to determine if you want to refuse the inclusion of the serial in the email (using the "$do" variable).

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.
The following user(s) said Thank You: oxido

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

  • Posts: 58
  • Thank you received: 6
  • Hikaserial Subscription Hikashop Business
2 weeks 5 days ago #372782

Hello Jerome. I really don’t know what to make of the documentation. Where should I look? Which files do I need to check? What do I need to change? I’d like the serial numbers to be sent only when the delivery method is ‘Email’.

I’m afraid I’m a bit overwhelmed by your information and don’t know what to do.

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

  • Posts: 26380
  • Thank you received: 4075
  • MODERATOR
2 weeks 5 days ago #372795

Hello,

You don't have to modify anything in HikaSerial. There is a need of building something.

As previously explained ; you want a custom feature which need to be provide by a custom plugin.
It means it requires some development to create that plugin.
Custom development and software support are different ; so we can't provide you that custom plugin, but we can provide developer documentation to help you (and IA tools) to understand how to integrate with HikaSerial.

The triggers "onCustomPdfSerialRule" / "onCustomAttachSerialRule" are the triggers you need (depending if you're using PDF Serials or Attach Serials).

For more details regarding the custom plugin creation, there is also a HikaShop documentation page : www.hikashop.com/support/documentation/6...r-documentation.html

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: 58
  • Thank you received: 6
  • Hikaserial Subscription Hikashop Business
1 week 4 days ago #372918

github.com/anirudhatalmale6-alt/hikaserial-serial-by-shipping

I’d be delighted if you could take a look at this new plugins, and I’d really appreciate an honest review.

The following user(s) said Thank You: Jerome

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

  • Posts: 26380
  • Thank you received: 4075
  • MODERATOR
6 days 8 hours ago #372987

Hello,

Regarding the HikaSerial plugin (the HikaShop plugin has another goal) ; it could be more straigh forward.
The order shipping ID can be retrieve directly on the order object ; which is already available via "$params->order" in the function "applyRule" ; so with the function "resolveOrderId" you could have another one named "extractShippingId".
So you could remove the function "getOrderShippingIds" since the information should be already available. Having a fallback is interesting but should not be required regarding the current context.
So you could just use the function "isOrderShippingAllowed" since "$params->order" is the object you're looking for.

Cache on "isShippingAllowed" is interesting but will not improve performances since there will be just one "orderId" in the page call context.

Otherwise the trigger "onSerialOrderPreUpdate" seems to not be required.

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: 26380
  • Thank you received: 4075
  • MODERATOR
6 days 8 hours ago #372988

Just forgot!

Otherwise the plugin seems to do the job :)
As explained, it could be more "direct" but there is no "error" or issue in the plugin!


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: 58
  • Thank you received: 6
  • Hikaserial Subscription Hikashop Business
6 days 5 hours ago #372992

Hello Jerome,
The developer completed this plugin for me within a few hours of me placing the order.
I was very pleasantly surprised and am extremely satisfied!
I’ve shared this with you so that we don’t run into any incompatibilities later on, but your feedback confirms to me that it’s a very good piece of work.
Do you think I should have it customised, or is it fine as it is, also in terms of future-proofing?
Thanks, Michael

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

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