How to check serial data of specific pack via URL

  • Posts: 4
  • Thank you received: 0
9 years 6 months ago #174424

-- HikaShop version -- : 2.3.3
-- HikaSerial version -- : 1.8.3
-- Joomla version -- : 3.3.6

HI,
in this tutorial says that I can check serial data via URL.
But this url

index.php?option=com_hikaserial&ctrl=serial&task=check&hikaserial[serial]=YOUR_SERIAL_DATA&hikaserial[format]=xml
will checking for all pack on my site.
How I can check serial data of specific pack only (via URL)?
I need something like
index.php?option=com_hikaserial&ctrl=serial&task=check&hikaserial[serial]=YOUR_SERIAL_DATA&hikaserial[pack_name]=YOUR_PACK_NAME&hikaserial[format]=xml
(this code for example and not working for me)
Regards,
Roman

Last edit: 9 years 6 months ago by romaster.

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

  • Posts: 25997
  • Thank you received: 4004
  • MODERATOR
9 years 6 months ago #174431

Hi,

Yes, the system will check on all "available" packs.
But if the other packs does not allow the "web service", the system won't check in that packs.
There is no current feature to add such filter in the web service system but I can add it in the TODO list for a future release.

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: 4
  • Thank you received: 0
9 years 6 months ago #174544

Hi,

But if the other packs does not allow the "web service", the system won't check in that packs.

But if I want to use 2 pack with different price I can't do it with URL and web service...
Unfortunately it's a bad option for me :(

I can add it in the TODO list for a future release

Yes, thanks, that would be wonderful
About my question - I found temporary solution:
it's override file
/components/com_hikaserial/views/serial/tmpl/check_xml.php
in this file just add pack_id in xml
<serial status="<?php echo $serial->serial_status; ?>" date="<?php echo $serial->serial_assign_date;?>" pack="<?php echo $serial->serial_pack_id ;?>">
But I have one small question:
How I can display pack name instead serial_pack_id ?
In other words, how get pack "name" by pack "id"?

Last edit: 9 years 6 months ago by romaster.

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

  • Posts: 25997
  • Thank you received: 4004
  • MODERATOR
9 years 6 months ago #174547

Hi,

You can load the pack in your view

$packClass = hikaserial::get('class.pack');
$pack = $packClass->get( (int)$serial->serial_pack_id );
echo $pack->pack_name;
I will see to return the pack content with the serial content in the view, so it will be easier to display some pack data.

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: romaster

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

  • Posts: 4
  • Thank you received: 0
9 years 6 months ago #174564

Hi,

You can load the pack in your view

Thanks, this working fine :)

so it will be easier to display some pack data

Please clarify, if I understood correctly do you mean that you will modify file check_xml.php instead of modifying URL?
Please note: URL request gives the answer to the question: serial of specific pack is valid or not. XML answer with pack data needs to be analyzed. For example, if 2 serials in different packs have the same serial data, which serial will be shown in xml(see attachment)? If both, How I need to parse and check it? I think, it greatly complicates the development of custom consumer plugin...
Regards,

Attachments:

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

  • Posts: 25997
  • Thank you received: 4004
  • MODERATOR
9 years 6 months ago #174567

Hi,

I just said that the view can also provide the pack data with the serial data.
Nothing less, nothing more !

When you try to consume a serial, the serial have to be unique.
There is no filter when you have a "consume" module or a consume page.

For the web service part, I agree with you that having a filter for the search is better. Having a web service access.
If you just consume serials using QRcode, we can imagine having a filter like the web services ; but in some specific cases (consuming from the front-end, no user assignation...) it won't be possible to the user to add an extra filter for the pack so it won't be possible.

But your screenshot is outside of the HikaSerial's prerogative: You have two identical serials in the same pack.
At this moment you can't use any web service or consuming.
The classical generator checks that the generate serials are unique ; so this kind of data is not possible unless you generate manually the data.

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: 4
  • Thank you received: 0
9 years 6 months ago #174645

Hi,
Ok, thanks for clarification.
Regards,

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

  • Posts: 25997
  • Thank you received: 4004
  • MODERATOR
9 years 6 months ago #174656

Hi,

Just to precise that the "filter" parameter for the check and consume function are in the TODO list for HikaSerial 1.8.4

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.

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