- Posts: 165
- Thank you received: 3
No easy way to print gift card in download area
- jschroeder
-
Topic Author
- Offline
-- HikaSerial version -- : 1.10.2
-- Joomla version -- : 3.4.8
I am using hikaserial with hikashop and I have noticed a major issue. Inside of the customer download area where i can download my gift cards it does not allow me to download my images but instead opens the image in the same tab with no easy way to print. I am sure this is default browser behavior.However, this is a problem it takes you off the main site with no way to get back, but by clicking the back button in the browser. That is not intuitive to a lot of people.
Also, I need a way to add a print button so I can print the coupon images instead of it opening the image in a new tab like above or if there is a way to download this image without it opening in a tab that is fine as well.
This is also a user problem. It may not be common sense to all customer that they can right click and print or go to their browser and print.
How can I add a print button to directly print the hikaserial coupon. I know it is dynamically generating the coupon when I click download but there has to be a way to add a print button there?
Please Log in or Create an account to join the conversation.
When HikaSerial use the HikaShop trigger to override the download of a (virtual) file ; it takes control of the headers.
And in these headers, I choose to use the one to mark the file as an image ; which makes the browser display it directly and not download it in your hard drive.
But, it would be possible to add an option in the "attach serial" plugin in order to choose the type of the HTTP headers, so you could have a configuration where the download of the file is forced everywhere (in the front-end order, in the backend, in the email).
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
- jschroeder
-
Topic Author
- Offline
- Posts: 165
- Thank you received: 3
Thanks,
Josh
Please Log in or Create an account to join the conversation.
There is no (simple) way to add a print button.
With a lot of development, some view override and maybe a custom plugin ; it might be possible to add it, but it is clearly not something which can be done in a few minutes or in a few hours.
It requires to modify several files in HikaShop and HikaSerial to change completely how the download of the product files can be done (and do it only for the HikaSerial "attach serial" files...)
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
- jschroeder
-
Topic Author
- Offline
- Posts: 165
- Thank you received: 3
Jerome wrote: Hi,
When HikaSerial use the HikaShop trigger to override the download of a (virtual) file ; it takes control of the headers.
And in these headers, I choose to use the one to mark the file as an image ; which makes the browser display it directly and not download it in your hard drive.
But, it would be possible to add an option in the "attach serial" plugin in order to choose the type of the HTTP headers, so you could have a configuration where the download of the file is forced everywhere (in the front-end order, in the backend, in the email).
Regards,
Hi I was able to figure out how to change the type as you suggested now. In the attachserial plugin in the very last function
I wrote the following
Original Code:
re-written code:
All i added is this 1 line header('Content-Disposition: attachment');
The problem I am having is it is downloading the html file and and not the actual coupon that is generated from the url how would i write the code to fix this?
I am using a .png as well for my image. I very urgently need at solution for this i have spent like 2 days trying to get this to work.
Thanks,
Josh
Please Log in or Create an account to join the conversation.
- jschroeder
-
Topic Author
- Offline
- Posts: 165
- Thank you received: 3
$filecustom = "AutobellPrintableGiftCard.png";
header('Content-Disposition: attachment; filename="'.$filecustom.'"');
It would be nice to give an option somewhere in the parameters of the hikaserial plugin to give the option to download the image file or have it just open like previously. I don't see why it couldn't be a parameter in the plugin itself.
The thing I don't like about what it did is it is going to be overridden in an update.
Please Log in or Create an account to join the conversation.
I was working on that before writing my previous answer and I would give you some piece of code to do so... But due to the fact that you edited (multiple times) your message(s), the original message was gone and you put your "print" question instead.
So, when I wanted to make you a reply, with the work I have done, I was surprised that the email notification I received was totally different..
Please understand that we do not appreciate that kind of message modification ; if you want to fix some typo that's fine.. But if you want to add new questions or totally change your message ; it won't help us to provide a good support and could have to opposite effect.
So yes ; I have already added two settings in the plugin to force the download and force the downloaded filename.
That feature will be include in the next HikaSerial release.
Thanks for your understanding.
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
- jschroeder
-
Topic Author
- Offline
- Posts: 165
- Thank you received: 3
Any idea when the new version may be available?
Thanks,
Josh
Please Log in or Create an account to join the conversation.
- jschroeder
-
Topic Author
- Offline
- Posts: 165
- Thank you received: 3
Please Log in or Create an account to join the conversation.
I can't provide you all modification like that in the forum ; there is too many modified parts (in several files, to add the new settings).
We can see to send you an updated version of the "attachserial" plugin by email ; best is to use the "contact us" form for that.
Otherwise, the patch is using that kind of code in order to force the download :
About the HikaSerial next release ; we do not have any schedule for the moment.
We have some developments in progress for HikaMarket and few patchs for HikaSerial.
I think that once the HikaMarket release will be done, we will perform some developments for HikaSerial (which are in the TODO list) and then we will be able to make a release.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
- jschroeder
-
Topic Author
- Offline
- Posts: 165
- Thank you received: 3
Thanks,
Josh
Please Log in or Create an account to join the conversation.