Jump to content

Recommended Posts

Hi all
 
I remake this module completely 
 
http: //www.prestasho...-gift cards 
So thank you for that has Pdriss module creator. 
 
It is compatible 1.5 / 1.6 (tested on 1.5.4 / 1.5.6.2 / 1.6.0.6 / 1.6.0.9) 
 
After installing the module 
 
In BO you can configure 
 
- The number of months of use of gift cards 
- And activate  or not the partial use for the voucher
 
If you press the "Create Product Gift Card" button that will: 
- Create a product Gift Card 
- Create a new category for this specific product
- Copy and generate the images
 
- REMEMBER to Check / Edit / Save this category - this product - the carrier - after creating 
- Create rules for using these cards in the descriptions of the product page and in this Category. 
 
 
If you press the button "delete the Product Gift Card" that goes: 
- Delete  product(s)
- Delete all images
- ** This will not delete the voucher is created with the module ** 
 
 
a preview of the e-mail sent to the customer containing the gift card
 
 
cartes-cadeau.jpg   cartes-cadeau.jpg   cartes-cadeau.jpg
 
In FO gift card are as normal products and the gift card will be sent by e-mail after receipt of payment (ie credit card payment immediately if and when changing the statutes of the order if payment accepted payment by check / bank) 
 
if the customer bought multiplel card he will receive an e-mail card with purchase of different codes for each card and the voucher will be created in BO for these cards. 
 
you can create your own photo gift cards and replace the ones that are in the folder img 
 
VERSION 3.3.1
- Added the option "Display currency" to display/not display the sign of the currency (by default) on the image of the card
- Added the option "Display 2 décimals" to display/not display the price with 2 decimals on the map image
- Added the "Free shipping" option for the voucher that will be created
 
For PS since 1.6.1.x apply this fix for generation of all pdf
 

VERSION 3.3.2

- Fix send email to a friend
- Fix price of the voucher in the right currency
- Adding emails and translations into German (DE) (thanks to @NSN)
- Verification of the code and adaptation to PSR4

For this update you can just replace the file giftcard.php to keep your already created cards.

 
As always a big thanks to Eolia 
you will completely unisntall the old version before installing this one.
 
 
@ ++
 
Loulou66
Edited by loulou66 (see edit history)
  • Like 9

Share this post


Link to post
Share on other sites

Look really great Loulou,

I Try't pdriss version also a while back and was not working completely for me so I'm curious if yours work

I see that you also added some useful features and added more functionality.

Thanks for remaking this module and many thanks for sharing it with us for free as this is a useful module.

Will test it this weekend and let you know the results.

 

Best regards

 

ysco..

Share this post


Link to post
Share on other sites

Hello Loulou66,

 

I have tested the module and most works without a problem but no customer email is be send.

I try`t to times a test order but no email with the voucher is send ( i already added a NL folder in the email folder with the templates )

I assume that the email will be send when the payment is accepted from the customer, or must i manually send the voucher some way ?

Also the voucher code for the email is not created, must that be created manually or will the module create a new voucher code every time someone buys a giftcard ?

I did not see any voucher created in BO.

 

 

Best regards,

 

ysco..

Edited by ysco (see edit history)

Share this post


Link to post
Share on other sites

HI

 

thanks for report ( i dont test with other lang)

 

and if you avtivate error message

 

http://www.prestashop.com/forums/topic/224525-how-to-turn-on-error-reporting-for-debug-information/

 

what error you have ?

 

normally all is automatic (email and voucher) when paiement is accepted in front(CB) or in BO(other delay paiement) when you change the status in paiement accepted

 

@++

 

Loulou66

Share this post


Link to post
Share on other sites

Hello Loulou.

 

I will test tomorrow further and let you know the results.

 

Best regards.

 

ysco..

Share this post


Link to post
Share on other sites

Hello again Loulou,

 

When i enable debug mode i do not get a error, i have installed on two different websites and both are not working.

One site runs on PS 1.6.0.8 and other on 1.6.0.9 both are test servers. I also have installed english language pack and did make a test order again but same results all is working but no voucher code created and no email is send.

If you want BO and FTP access to investigate then please let me know as it would be awesome if the module would work correct.

 

Best regards,

 

ysco..

Share this post


Link to post
Share on other sites

Coucou Loulou66

 

Ci-joint ma modeste contribution avec quelques modifications:

 

- Correction de quelques bugs

- Modification de la désinstall sous 1.6 (les catégories ne se désinstallent pas bien si on est en multi)

- Ajout de la possibilité de saisir ses valeurs de déclinaisons

- Images générées dynamiquement avec valeur de la carte en surimpression

- Image envoyée en base64 dans le mail

- Copie des bons générés dans le répertoire /cards suivant l'id_order, le temps de leur validité (en cas de litige ou si le client ne reçoit pas le mail)

- Une petite fonction qui évite de passer en "untrusted" sous 1.6.0.8 et suivantes

- ...

 

N'hésite pas à me donner ton avis :)

 

...En attente de la version 2.4

Edited by Eolia (see edit history)

Share this post


Link to post
Share on other sites

Thanks Eolia for your mod version.

I try`t yours as well but i still have problems that no voucher code is created and no email is send.

Are there more with this problem ?

 

Best regards,

 

ysco..

Edited by ysco (see edit history)

Share this post


Link to post
Share on other sites

Thanks Eolia for your mod version.

I try`t yours as well but i still have problems that no voucher code is created and no email is send.

Are there more with this problem ?

 

Best regards,

 

ysco..

This module generate the code and sends the mail ONLY if the payment is ok (status PS_OS_WS_PAYMENT or PS_OS_PAYMENT)
Please, verify if your order state is in one of these status.

Share this post


Link to post
Share on other sites

HI

 

@Eolia un grand merci pour tes améliorations et les corrections c'est vraiment super, j'ai corriger un bug lors de l'ajout de la catégorie pour le multi-langues et décaler vers la droite le texte sur les cartes

 

VERSION 2.1
- A big thank you for Eolia improvement and bug fixes 
- EN translation for multilingual compatibility 
- Fixed when adding the category for the multilingual
 
Before install this new Version delete product gifcard uninstall the old version and delete it
 
 
@++
 
Loulou66
Edited by loulou66 (see edit history)

Share this post


Link to post
Share on other sites

@ Eolia,

 

Well i have placed a order in FO and choose the bankwire option as sample and in BO i accept the payment of this order so i assume that at this point the code should be generated and then the email would be send out " Correct " ?

What do you mean exactly with check " status PS_OS_WS_PAYMENT or PS_OS_PAYMENT " I accepted the payment in orderstatus.

 

Thanks for helping.

 

Best regards,

 

ysco..

Share this post


Link to post
Share on other sites

Yes it's that PS_OS_PAYMENT = payment accepted

 

Did you enable the display of errors in defines.inc.php?

Share this post


Link to post
Share on other sites

Hello Eolia,

 

Yes i did and i do not get any errors in BO and FO and also no errors with google developertools.

 

Regards,

 

ysco..

Share this post


Link to post
Share on other sites

Hello Loulou,

 

I have try`t Eolia version last night and that did not work either, is your version different again then Eolia ?

If so i will try yours also later tonight to see if that one works ;)

 

Best regards,

 

 

ysco..

Share this post


Link to post
Share on other sites

Hello again Loulou and Eolia,

 

I have try`t again and i have some errors now, i have added a screenshot.

 

Hope you have a idea what is going on.

 

Best regards,

 

ysco..

 

post-31440-0-66076300-1410364726_thumb.png

Share this post


Link to post
Share on other sites

Hello again Loulou and Eolia,

 

I have try`t again and i have some errors now, i have added a screenshot.

 

Hope you have a idea what is going on.

 

Best regards,

 

ysco..

 

attachicon.gif2014-09-10_17-56-03.png

Yes, it's a shell !!

replace

$productLink = Context::getContext()->link->getProductLink($product->id);	

by: 

$productLink = Context::getContext()->link->getProductLink($id_product);

Sorry for the bad replacement...

Share this post


Link to post
Share on other sites

Hello Eolia,

 

Yes that did it, replaced the code and the voucher code is created and send ;)

So this issue is in the module from the beginning as all versions did not work for me.

 

Question,

When it creates a voucher in BO then  the option partially used is not enabled, when this is not enabled and i add the required code from my voucher then it does add the voucher but price stays the same.It looks like voucher is not used but when you add it again it says voucher already added but price still the same.

When you enable partially used and try it again then it works correct, so is this a bug or is this done with a reason ?

If not then maybe you can change the code when voucher is created partially used enabled by default ;)

 

Thanks for the great work.

 

Best regards,

 

ysco..

Share this post


Link to post
Share on other sites

HI all

 

Another big thank you toEolia who did a great job

 

VERSION 2.4
 
New Version Modified by Eolia
 
- You can configure the name of Cards 
- You can configure or add the image of Cards 
- You can configure the declinations Cards 
- Overview of the email with the picture Selected 
- Fixed some bug 
 
 Tested with PS 1.5.6.2 1.6.0.6 in EN and FR
 
Before install this new Version uninstall the old version and delete it
 
 
@++
 
Loulou66

Share this post


Link to post
Share on other sites

Hi!

 

Thanks so much! Very useful module. 
 
Can you fix it so you can get it with Kronor visible instead of just € ?
 
Regards
 
MacRoy

Share this post


Link to post
Share on other sites

 

Hi!

 

Thanks so much! Very useful module. 
 
Can you fix it so you can get it with Kronor visible instead of just € ?
 
Regards
 
MacRoy

 

Yes it's a mistake ( only on products images not on the customer email) replace the line 481 in giftcard.php by:

$price = $this->l('Value') . ': ' . $value . ' '.Currency::getDefaultCurrency()->sign;
  • Like 1

Share this post


Link to post
Share on other sites
Hello! 

 

I have a small problem. See the picture. 

 

The text on the gift card will not fit on 1000 Kronor.

 

 

Regards

 

MacRoy

post-413956-0-22875100-1410620482_thumb.jpg

Share this post


Link to post
Share on other sites

 

Hello! 
 
I have a small problem. See the picture. 
 
The text on the gift card will not fit on 1000 Kronor.
 
 
Regards
 
MacRoy

 

Ok it's a particular case :)

Only for you: you must modify the height ( 45 to 35) of the text in each block (3 code blocks) as this :

// in function generateImage:

    imagettftext($imageView, 40, 0, 290, 45, $color2, $font2, $code);
    imagettftext($imageView, 35, 0, 12, 267, $color2, $font1, $price);
    imagettftext($imageView, 35, 0, 10, 265, $color, $font1, $price);

// in function _displayForm :

    imagettftext($imageView, 40, 0, 290, 45, $color2, $font2, $code);
    imagettftext($imageView, 35, 0, 12, 267, $color2, $font1, $value);
    imagettftext($imageView, 35, 0, 10, 265, $color, $font1, $value);

// in function hookActionOrderStatusUpdate :

   imagettftext($imageView, 40, 0, 290, 45, $color2, $font2, $code);
   imagettftext($imageView, 35, 0, 12, 267, $color2, $font1, $value);
   imagettftext($imageView, 35, 0, 10, 265, $color, $font1, $value);


Hope it helps !

554.jpg

  • Like 1

Share this post


Link to post
Share on other sites
It would be great if we could change the color of the text, for example (Black) when you have a white background on the gift card. The current situation can not be seen at all the text on a white background. 

 

With best regards

 

MacRoy

Share this post


Link to post
Share on other sites

 

It would be great if we could change the color of the text, for example (Black) when you have a white background on the gift card. The current situation can not be seen at all the text on a white background. 
 
With best regards
 
MacRoy

 

 

This is provided :)  

 

(in the TODO list...)

  • Like 1

Share this post


Link to post
Share on other sites
Thanks so much! 

 

It solved it all. 

 

I would like to make a small donation. Where can I do this? 

 

Thanks for a very good module. 

 

With best regards

 

MacRoy

Share this post


Link to post
Share on other sites

Sure if you want to,   :D  but you can also get it in your own currency if you wish!

 

MacRoy

Share this post


Link to post
Share on other sites

I have found a small bug. 


 


The expiry date is not true.


 


I have set it to three months


 


But it shows considerably more. Look at the picture


 


Regards


 


MacRoy


post-413956-0-53497300-1410629092_thumb.jpg

Share this post


Link to post
Share on other sites
Il sonne bien! 

 

Dans l'attente de la prochaine version. 

 

Merci beaucoup

 

MacRoy

Share this post


Link to post
Share on other sites

 

I have found a small bug. 

 

The expiry date is not true.

 

I have set it to three months

 

But it shows considerably more. Look at the picture

 

Regards

 

MacRoy

 

Are you on a local server ?

Share this post


Link to post
Share on other sites

Because, locally, the server settings can be inaccurate and I am unable to reproduce your bug ...

Share this post


Link to post
Share on other sites
Ok! 

I understand. Yes I run locally. But I have no problems with any other programs or apps.

 

 

Share this post


Link to post
Share on other sites

You see this bug in the back office giftcard page AND in the rules cart page (latest created, of course)?

Share this post


Link to post
Share on other sites

No! I see it in the email sent to the customer.

Yes it's a loulou66's bug, hihihi !

replace in the last function public function hookActionOrderStatusUpdate($params) :

			if ($lang == 'fr')
				$date_gift = date('d-m-Y H:i:s', mktime(0, 0, 0, date("m") +  $giftcard->validity, date("d"), date("Y")));
			else
				$date_gift = date('Y-m-d H:i:s', mktime(0, 0, 0, date("Y"), date("m") +  $giftcard->validity, date("d")));

by :

$date_gift = date('Y-m-d H:i:s', strtotime('+ '.$giftcard->validity.' months'));

Share this post


Link to post
Share on other sites

wow! that's strage

thank yu for attention

new version will be released within next 2-3 hours

Looking forward to it. Thank you very much.

Share this post


Link to post
Share on other sites
Have not a clue! I just answered the question (email) I got when I logged in myself today on the PrestaShop Forum. But now that I see it, I also think that it is very strange! You may ask PrestaShop moderator how this has happened. 

 

Very strange.

 

 

Share this post


Link to post
Share on other sites

Hi all

 

VERSION 2.4.2 
 
- Added 'Datepicker' to the date of validity wich fixe date bug 
- Removal of hours / minutes / seconds for the validity date (default is  00:00:00) 
- Added check if a Gift Card is in Oders when changing status to avoid sending cards and create coupons with the controls without Gift Card
- Added checking if the voucher code exist yet when sending email and the creation of the voucher to avoid duplication.
 
If you have V2.4.1 Delete product /uninstall the V2.4.1 en install this new version
 
you download this module here :
 
 
@ ++
 
Loulou66
Edited by loulou66 (see edit history)

Share this post


Link to post
Share on other sites

Many thanks loulou66 for sharing this new version, will test it and have a look at the new features ;)

 

Best regards

 

ysco..

Share this post


Link to post
Share on other sites
Hi loulou66! 

 

Wow that was quick. 

 

Have tried the latest release with this result. 

 

As to date. It say`s that much in 2014. I sat namely from the calendar date from today to three months ahead and got this result.

 

see pictures

 

 

Regards

 

MacRoy

post-413956-0-86675900-1410888695_thumb.jpg

post-413956-0-12324500-1410888716.jpg

Share this post


Link to post
Share on other sites

Hi 

 

ok it's my fault i changed 'validity' for format date in sql you must reinitialize the module (peharps delete product before)

 

i modify my 1st post

 

@++

 

Loulou66

Share this post


Link to post
Share on other sites
Well I love this module very much! 

 

I uninstalled the module completely before installing the latest. In addition, I removed the product additionally.

 

Best regards

 

MacRoy

Share this post


Link to post
Share on other sites

It sounds very good. I look forward to it ... 

 
If you want, I am interested as a beta tester.
 
 
Regards
 
MacRoy

Share this post


Link to post
Share on other sites

Hi all


 

VERSION 3.0

 

Always with the cooperation of Eolia 

 

- Full modication of BO 

- Each card created is now a virtual product 

- Display the list of map created with possibility of changing each card 

(overview of the email is an example it does not include the true picture of the product) 

 


 

@ ++ 

 

Loulolu66

Share this post


Link to post
Share on other sites

hi all

 

VERSION 3.0.1
 
- Fixed bug with categories and price display in the list. 
- Added "partial use" in the list with the possibility of changing the status from the list of maps 
 
@ ++ 
 
Loulou66 

Share this post


Link to post
Share on other sites

 

hi all

 

VERSION 3.0.1
 
- Fixed bug with categories and price display in the list. 
- Added "partial use" in the list with the possibility of changing the status from the list of maps 
 
@ ++ 
 
Loulou66 

 

Loulou ! Il manque la pièce jointe !  (et look ton Skype stp :) )

Share this post


Link to post
Share on other sites

Thanks for the module, works great!

Here are  the translations to Spanish and Catalan if you want to add the module.

Regards

lang.zip

Share this post


Link to post
Share on other sites

Hi  

 

thank fransesc i integrate it in the module for the future update

 

@++

 

Loulou66

  • Like 1

Share this post


Link to post
Share on other sites


Hi all

 

VERSION 3.1.1

 

- add some models o f card (thanks to G.Solidarité)

- add border for thumbnail of models for wihte card and incrase whidth

- add translation ES(Spain) and CA(Catalan) (Thanks to )

- add option for prix with/without tax of card and voucher

- add option for chose text color and barcode color


 


 


@ ++

 

Loulou66

Share this post


Link to post
Share on other sites


VERSION 3.1.4

 

- Fix bug displaying the logo of the store in the preview email 

- Added a unit in card stock after sending email (the stock will always be 100 units) 

- Added short description and modification of translation  for a better understanding of the partial use and taxes 

- Modification emails 

(you can replace all the files in the 3.1.3 directly without deisntaller upload module) 

 



 


@ ++

 

Loulou66

Share this post


Link to post
Share on other sites

Hello! 

 
I'm sorry to inform you that there is a bug in 3.1.4 regarding the tax. 
 
I have chosen to show the price including taxes, but when it is rendered clearly shows that without tax. 
 
Would be grateful if you could fix this. 
 
Examples of E-mail does not appear that either
 
I did a clean new install.
 
 
Best regards
 
MacRoy

post-413956-0-87451300-1414363115_thumb.jpg

Edited by MacRoy (see edit history)

Share this post


Link to post
Share on other sites
No, there is no bug. 

You are mixing the price paid for this card and the value of the voucher usable with this card. 

If the value is tax-free, the price paid is higher (price with taxes if they are enabled on your shop)

If the value is all taxes included, the price paid is the same. 

FO1.png  

Look in your BO> Products, basic prices are HT...

 

BO1.png

Share this post


Link to post
Share on other sites

Hi all

 

VERSION 3.1.5 
 
  for designers who make models with the prize drawing 
- Added option to show or not the bar code on the card 
- Added option to show or not the text + price on the card  
- Removal of shade if the text color is black + price 
 
- Added field cuztomization to send the card to a friend via email 
- Modification various form and the list in BO for new options 
- Modification the name of the card in the "Cards" folder for past orders and send (the map are named id_de_la_commande-id_du_produit.png) 
 
As always a big thanks to Eolia 
you will completely unisntaller the old version before installing this one.
 
 
@ ++
 
Loulou66
  • Like 1

Share this post


Link to post
Share on other sites

hi

 

is there a demo?

and question is, is it this way?"i produce a voucher code, and then every one who wants that code should pay and buy it" so everyone will have the same code?

or this way?"each time someone buys a card, a new code is generated which can be used once,and by one user"?

 

tnx

Share this post


Link to post
Share on other sites

In the new version can a customer add a custom message and send to another email address. It seems to work if you create order for customer then the box pops up to add details but not in front office. Is it supposed to or is it just in bo that this happens

Share this post


Link to post
Share on other sites



VERSION 3.1.6

 


- Added option to display or not the shadow for text + price

- Added the option to position bar code and text + price on 9 preset position

- Fixed minor bug

 


As always a big thanks to Eolia 

you will completely unisntaller the old version before installing this one.


 



 


@ ++

 

Loulou66

Edited by loulou66 (see edit history)

Share this post


Link to post
Share on other sites

Hello!

 
I have chosen to show prices including VAT, but the price shows no sales tax on mail that the customer gets!
 
Could you be so kind and fix this?
 
I use 3.1.6
 
Best regards
 
MacRoy
  • Like 1

Share this post


Link to post
Share on other sites




Hi all

 

VERSION 3.1.7

 



- Deleting the text "value"

- Added the size for the price

- Added reminder of the position for the code and the price when editing

- Fixed price for the voucher and email




 

you will completely unisntaller the old version before installing this one.


 



 


@ ++

 

Loulou66

Share this post


Link to post
Share on other sites

hi

 

is there a demo?

and question is, is it this way?"i produce a voucher code, and then every one who wants that code should pay and buy it" so everyone will have the same code?

or this way?"each time someone buys a card, a new code is generated which can be used once,and by one user"?

 

tnx

One code by card :)

  • Like 1

Share this post


Link to post
Share on other sites

Hi all

 

There was an error with the last upload please donwload the last version again thx

 

@++

 

Loulou66

Share this post


Link to post
Share on other sites

Hi!

 

Thank you very much!

 
Now it works as it should.
 
Very good features that you added!
 
 
Best regards
 
MacRoy

Share this post


Link to post
Share on other sites

Will this module work for MultiStore version on 1.6.0.8

 

As all my stores sell different product with different domain name

Yes ! We use the context shop :)

Share this post


Link to post
Share on other sites

Hey!

 

Is there a possibility to get COMBINATIONS FOR THIS PRODUCT visible on the product page so that you can get all the gift cards in one place instead of having in my case five gift certificates, so the customer can choose the amount He / She wants have kind of a drop down menu where they can choose the  amount themselves ?

 

Se picture.

 

 

Best regards

 

MacRoy

 

post-413956-0-68039300-1416525788_thumb.jpg

Edited by MacRoy (see edit history)

Share this post


Link to post
Share on other sites

No in prestashop you can't add combinations with a virtual product, sorry...

Share this post


Link to post
Share on other sites

Hi!

 

Is it possible to fix so that the customer can determines the amount on the gift card? 

 

Best regards

 

MacRoy

 

Share this post


Link to post
Share on other sites

Hello,

 

I don't understand if a gift-cart has a universal code or every order made as his own code.

By the way I try this module, made an order, accept the order but no mail was sent to me :( 

Share this post


Link to post
Share on other sites

Each gift card has his own code.

 

Which version of Presta & module ?

 

Others mails on your shop are sent ?

Share this post


Link to post
Share on other sites

Each gift card has his own code.

 

Which version of Presta & module ?

 

Others mails on your shop are sent ?

 

OK, thanks!

 

My presta is 1.6.0.9, the module is 3.1.7 and my other mails works well!

Share this post


Link to post
Share on other sites

ok, the module send the email only if the status is "Payment accepted" or "Remote payment accepted"

Share this post


Link to post
Share on other sites

ok, the module send the email only if the status is "Payment accepted" or "Remote payment accepted"

 

Yes I know. I made an order - pay with bank - payment accepted. No mail.

By the way the voucher with his own code was made (voucher is not attached to the user who made the order...you should implement it ;) )

 

After that I notice that if I add a product on my order the shipping costs go crazy. 

For example: gift card + 1 product = shipping cost for gift card + shipping costs for product

 

edit: 

 

"(voucher is not attached to the user who made the order...you should implement it  ;) )" was a stupid observation: the voucher is a gift to a friend, not for us :P

 

edit2: 

 

if a make a virtual product by myself the shipping costs go crazy too...it should be something wrong in my settings

 

edit3:

 

THIS  is how my module looks like...as u can see the "Example of email" is blank. Is it right?

(I'm thinking to translate this module into Italian :) )

Edited by Desko (see edit history)

Share this post


Link to post
Share on other sites
Yes your system is a little moldy ... :blink: 

 

The email example shouldn't be blank. Please verify if you have your iso language in the module mails directory. If not, duplicate the "en" folder and rename it with your iso code and translate all files.

 

For info, virtual products can't have shipping costs

 

1.6.0.9 Version has a lot of bugs...

Share this post


Link to post
Share on other sites

 

Yes your system is a little moldy ... :blink:
 
The email example shouldn't be blank. Please verify if you have your iso language in the module mails directory. If not, duplicate the "en" folder and rename it with your iso code and translate all files.
 
For info, virtual products can't have shipping costs
 
1.6.0.9 Version has a lot of bugs...

 

Ok now I have the example. I test it!

Share this post


Link to post
Share on other sites

It's a Prestashop feature :) It's a pb for you ?

no, but I can't find an answer to it. One or more it doesn't matter, so why a user can choose it?!

Share this post


Link to post
Share on other sites