diff --git a/include/controllers/default/cockpit/giftcards/index.php b/include/controllers/default/cockpit/giftcards/index.php
index d1b0a6e6e..479adfdcb 100644
--- a/include/controllers/default/cockpit/giftcards/index.php
+++ b/include/controllers/default/cockpit/giftcards/index.php
@@ -44,7 +44,12 @@ class Controller_giftcards extends Crunchbutton_Controller_Account {
$giftcards = Crunchbutton_Promo::multiple( c::getPagePiece(2) );
c::view()->layout('layout/blank');
c::view()->giftcards = $giftcards;
- c::view()->display('giftcards/print');
+ c::view()->display('giftcards/print/default');
+ } else if( c::getPagePiece(1) == 'print-flyer' ){
+ $giftcards = Crunchbutton_Promo::multiple( c::getPagePiece(2) );
+ c::view()->layout('layout/blank');
+ c::view()->giftcards = $giftcards;
+ c::view()->display('giftcards/print/flyer');
} else {
$giftcard = Crunchbutton_Promo::o(c::getPagePiece(1));
if ($giftcard->id_promo) {
diff --git a/include/views/default/cockpit/giftcards/content.phtml b/include/views/default/cockpit/giftcards/content.phtml
index a0a56c0b4..c491edca1 100644
--- a/include/views/default/cockpit/giftcards/content.phtml
+++ b/include/views/default/cockpit/giftcards/content.phtml
@@ -24,7 +24,8 @@
=$date->format('M jS Y')?> =$date->format('g:i:s A')?> |
-
+
+
=$giftcard->code; ?>
|
$= Util::ceil($giftcard->value, 2); ?> |
diff --git a/include/views/default/cockpit/giftcards/giftcard.phtml b/include/views/default/cockpit/giftcards/giftcard.phtml
index 9d2fa94cc..1e3e027c6 100644
--- a/include/views/default/cockpit/giftcards/giftcard.phtml
+++ b/include/views/default/cockpit/giftcards/giftcard.phtml
@@ -154,6 +154,7 @@ if ( $credit->id_credit ) {
giftcard->id_promo ) ){ ?>
Print
+ Print flyer
giftcard->phone ) { ?>
Send by sms
diff --git a/include/views/default/cockpit/giftcards/new.phtml b/include/views/default/cockpit/giftcards/new.phtml
index 9dbfb2a03..c3ccccd38 100644
--- a/include/views/default/cockpit/giftcards/new.phtml
+++ b/include/views/default/cockpit/giftcards/new.phtml
@@ -8,7 +8,7 @@
?>
-
+
@@ -164,6 +164,7 @@
+
@@ -255,7 +256,7 @@
Questions: Call or text us anytime at (646) 783-1444
$
To redeem, go tocrunchbutton.com/giftcard/ Free Food from
- Crunchbutton ; ?>)
+ Crunchbutton
@@ -395,7 +396,11 @@ $(function() {
} );
$(document).on('click', '.admin-giftcard-print', function() {
- App.giftcards.print = true;
+ App.giftcards.print = 'default';
+ sendForm();
+ } );
+ $(document).on('click', '.admin-giftcard-print-flyer', function() {
+ App.giftcards.print = 'flyer';
sendForm();
} );
});
@@ -407,7 +412,7 @@ function sendForm(){
var id_user = $( '#id_user' ).val();
var total = $( '#total' ).val();
var message = $( '#giftcard-message' ).val();
- var print = ( App.giftcards.print ) ? 1 : 0;
+ var print = ( App.giftcards.print ) ? App.giftcards.print : 0;
var id_order_reference = $( '#id_order_reference' ).val();
var prefix = $( '#prefix' ).val();
@@ -465,7 +470,11 @@ function sendForm(){
} else {
alert( 'Gift card(s) created!' );
if( App.giftcards.print ){
- location.href = '/giftcards/print/' + json.success;
+ if( App.giftcards.print == 'flyer' ){
+ location.href = '/giftcards/print-flyer/' + json.success;
+ } else {
+ location.href = '/giftcards/print/' + json.success;
+ }
} else {
location.href = '/giftcards';
}
diff --git a/include/views/default/cockpit/giftcards/print.phtml b/include/views/default/cockpit/giftcards/print/default.phtml
similarity index 93%
rename from include/views/default/cockpit/giftcards/print.phtml
rename to include/views/default/cockpit/giftcards/print/default.phtml
index 3a984f417..c8d035766 100644
--- a/include/views/default/cockpit/giftcards/print.phtml
+++ b/include/views/default/cockpit/giftcards/print/default.phtml
@@ -4,8 +4,8 @@
Gift card
-
-
+
+
0 ) {
?>
Questions: Call or text us anytime at (646) 783-1444
$ value;?> To redeem, go tocrunchbutton.com/giftcard/code;?> Free Food from
-

+
+
+
+
+ Gift card
+
+
+
+
+
+giftcards;
+if( sizeof( $giftcards ) > 0 ) {
+ foreach( $giftcards as $giftcard ){
+ $message = $giftcard->message;
+ if( !$message || $message == '' ){
+ $message = 'crunchbutton.com';
+ }
+ if( !$giftcard ){ continue; }
+ $count++;
+ if( $giftcard->id_restaurant ){
+ $restaurant = $giftcard->restaurant();
+ $restaurant_name = $restaurant->name;
+ } else {
+ $restaurant_name = 'Crunchbutton';
+ }
+ ?>
+
+ $
+ value;?>
+ To redeem, go tocrunchbutton.com/giftcard/code;?>
+ Free Food from
+
+ 
+ 
+
+
+
+
+
+
\ No newline at end of file
diff --git a/www/assets/css/giftcard.css b/www/assets/css/giftcard/default.css
similarity index 100%
rename from www/assets/css/giftcard.css
rename to www/assets/css/giftcard/default.css
diff --git a/www/assets/css/giftcard/flyer.css b/www/assets/css/giftcard/flyer.css
new file mode 100644
index 000000000..90022aab7
--- /dev/null
+++ b/www/assets/css/giftcard/flyer.css
@@ -0,0 +1,68 @@
+ .giftcard{
+ text-align: center;
+ width: 816px;
+ margin: 0 auto;
+ }
+ .flyer{
+ width: 816px;
+ }
+ .parachutes{
+ width: 600px;
+ position: absolute;
+ margin-top: 250px;
+ margin-left: 110px;
+ }
+ .value{
+ font-family: 'Atomic Age', cursive;
+ color:#FFF;
+ font-size: 145px;
+ position: absolute;
+ z-index: 10;
+ letter-spacing: -10px;
+ margin-left: 60px;
+ margin-top: 870px;
+ text-align: center;
+ width: 140px;
+ }
+ .dollar{
+ color:#FFF;
+ font-family: 'Atomic Age', cursive;
+ font-size: 25px;
+ font-weight: bold;
+ position: absolute;
+ z-index: 11;
+ margin-left: 70px;
+ margin-top: 920px;
+ text-align: left;
+ width: 220px;
+ }
+ .info{
+ margin-left: 225px;
+ margin-top: 905px;
+ color:#FFF;
+ font-family: 'Helvetica';
+ font-size: 35px;
+ font-weight: bold;
+ position: absolute;
+ text-align: left;
+ }
+ .info .link{
+ display: block;
+ color:#7b201a;
+ font-size: 25px;
+ margin-top: 10px;
+ }
+ .freefood{
+ width: 500px;
+ margin-left: 275px;
+ margin-top: 990px;
+ color:#FFF;
+ font-family: 'Helvetica';
+ font-size: 18px;
+ font-weight: bold;
+ position: absolute;
+ text-align: right;
+ }
+ .page{
+ page-break-after:always;
+ }
\ No newline at end of file
diff --git a/www/assets/css/giftcard-reset.css b/www/assets/css/giftcard/reset.css
similarity index 100%
rename from www/assets/css/giftcard-reset.css
rename to www/assets/css/giftcard/reset.css
diff --git a/www/assets/images/giftcard/flyer_parachutes.png b/www/assets/images/giftcard/flyer_parachutes.png
new file mode 100644
index 000000000..672bcf964
Binary files /dev/null and b/www/assets/images/giftcard/flyer_parachutes.png differ
diff --git a/www/assets/images/giftcard_print.svg b/www/assets/images/giftcard/print-default.svg
similarity index 100%
rename from www/assets/images/giftcard_print.svg
rename to www/assets/images/giftcard/print-default.svg
diff --git a/www/assets/images/giftcard/print-flyer.svg b/www/assets/images/giftcard/print-flyer.svg
new file mode 100755
index 000000000..1dd8b326c
--- /dev/null
+++ b/www/assets/images/giftcard/print-flyer.svg
@@ -0,0 +1,1342 @@
+
+
+
+
|