Skip to content

Commit

Permalink
Manage Offer Email for Vendors
Browse files Browse the repository at this point in the history
  • Loading branch information
nirmalrdesai committed Jul 26, 2021
1 parent f6a5e58 commit 751a8b0
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
7 changes: 5 additions & 2 deletions public/includes/emails/woocommerce-new-counter-offer.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,11 @@
<?php do_action('woocommerce_email_header', $email_heading, $email); ?>
<?php
if (class_exists('Angelleye_Offers_For_Woocommerce_WCVendors') && class_exists('WCVendors_Pro')) {
$vendor_dashboard_page_url = angelleye_get_vendor_dashboard_page_url();
printf('<div style="text-align: center;"><p style="font-size: 16px;text-align: center;font-family: inherit;"><strong>' . __('New counter offer submitted on', 'offers-for-woocommerce') . ' %s.</strong><br />' . __('To manage this counter offer please use the following link:', 'offers-for-woocommerce') . '</p> %s', get_bloginfo('name'), '<br><p style="text-align:center"><a style="background-color: #008CBA;border: none;color: white;padding: 12px 20px;text-align: center;text-decoration: none;display: inline-block;font-size: 16px;margin: 4px 2px;cursor: pointer;" href="' . $vendor_dashboard_page_url . 'woocommerce_offer/edit/' . $offer_args['offer_id'] . '">' . __('Manage Counter Offer', 'offers-for-woocommerce') . '</a></p></div>');
$offer_edit_page_url = trim(dokan_get_navigation_url('woocommerce_offer/?action=edit&id=' . $offer_args['offer_id']),'/');
printf('<div style="text-align: center;"><p style="font-size: 16px;text-align: center;font-family: inherit;"><strong>' . __('New counter offer submitted on', 'offers-for-woocommerce') . ' %s.</strong><br />' . __('To manage this counter offer please use the following link:', 'offers-for-woocommerce') . '</p> %s', get_bloginfo('name'), '<br><p style="text-align:center"><a style="background-color: #008CBA;border: none;color: white;padding: 12px 20px;text-align: center;text-decoration: none;display: inline-block;font-size: 16px;margin: 4px 2px;cursor: pointer;" href="' . $offer_edit_page_url . '">' . __('Manage Counter Offer', 'offers-for-woocommerce') . '</a></p></div>');
} elseif ( class_exists( 'Angelleye_Offers_For_Woocommerce_Dokan' ) ) {
$vendor_dashboard_page_url = angelleye_get_vendor_dashboard_page_url();
printf('<div style="text-align: center;"><p style="font-size: 16px;text-align: center;font-family: inherit;"><strong>' . __('New counter offer submitted on', 'offers-for-woocommerce') . ' %s.</strong><br />' . __('To manage this counter offer please use the following link:', 'offers-for-woocommerce') . '</p> %s', get_bloginfo('name'), '<br><p style="text-align:center"><a style="background-color: #008CBA;border: none;color: white;padding: 12px 20px;text-align: center;text-decoration: none;display: inline-block;font-size: 16px;margin: 4px 2px;cursor: pointer;" href="' . $vendor_dashboard_page_url . 'woocommerce_offer/edit/' . $offer_args['offer_id'] . '">' . __('Manage Counter Offer', 'offers-for-woocommerce') . '</a></p></div>');
} else {
printf('<div style="text-align: center;"><p style="font-size: 16px;text-align: center;font-family: inherit;"><strong>' . __('New counter offer submitted on', 'offers-for-woocommerce') . ' %s.</strong><br />' . __('To manage this counter offer please use the following link:', 'offers-for-woocommerce') . '</p> %s', get_bloginfo('name'), '<br><p style="text-align:center"><a style="background-color: #008CBA;border: none;color: white;padding: 12px 20px;text-align: center;text-decoration: none;display: inline-block;font-size: 16px;margin: 4px 2px;cursor: pointer;" href="' . admin_url('post.php?post=' . $offer_args['offer_id'] . '&action=edit') . '">' . __('Manage Counter Offer', 'offers-for-woocommerce') . '</a></p></div>');
}
Expand Down
13 changes: 13 additions & 0 deletions public/includes/emails/woocommerce-new-offer.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,19 @@
__('To manage this offer please use the following link:', 'offers-for-woocommerce') . '</p> %s',
get_bloginfo('name'),
'<a style="background-color: #008CBA;border: none;color: white;padding: 12px 20px;text-align: center;text-decoration: none;display: inline-block;font-size: 16px;margin: 4px 2px;cursor: pointer;" href="' . $offer_edit_page_url . '">' . __('Manage Offer', 'offers-for-woocommerce') . '</a> <a style="background-color: #f44336;border: none;color: white;padding: 12px 20px;text-align: center;text-decoration: none;display: inline-block;font-size: 16px;margin: 4px 2px;cursor: pointer;" href="' . $decline_url . '">' . __('Decline Offer', 'offers-for-woocommerce') . '</a> <a style="background-color: #4CAF50;border: none;color: white;padding: 12px 20px;text-align: center;text-decoration: none;display: inline-block;font-size: 16px;margin: 4px 2px;cursor: pointer;" href="' . $accept_url . '">' . __('Approve Offer', 'offers-for-woocommerce') . '</a>');
} elseif ( class_exists( 'Angelleye_Offers_For_Woocommerce_Dokan' ) ) {

$accept_url = dokan_get_navigation_url('woocommerce_offer/accept/' . $offer_args['offer_id']);
$decline_url = dokan_get_navigation_url('woocommerce_offer/decline/' . $offer_args['offer_id']);
$offer_edit_page_url = trim(dokan_get_navigation_url('woocommerce_offer/?action=edit&id=' . $offer_args['offer_id']),'/');

printf('<div style="text-align: center;">
<p style="font-size: 16px;text-align: center;font-family: inherit;">
<strong>' . __('New offer submitted on', 'offers-for-woocommerce') . ' %s.</strong><br />' .
__('To manage this offer please use the following link:', 'offers-for-woocommerce') . '</p> %s',
get_bloginfo('name'),
'<a style="background-color: #008CBA;border: none;color: white;padding: 12px 20px;text-align: center;text-decoration: none;display: inline-block;font-size: 16px;margin: 4px 2px;cursor: pointer;" href="' . $offer_edit_page_url . '">' . __('Manage Offer', 'offers-for-woocommerce') . '</a> <a style="background-color: #f44336;border: none;color: white;padding: 12px 20px;text-align: center;text-decoration: none;display: inline-block;font-size: 16px;margin: 4px 2px;cursor: pointer;" href="' . $decline_url . '">' . __('Decline Offer', 'offers-for-woocommerce') . '</a> <a style="background-color: #4CAF50;border: none;color: white;padding: 12px 20px;text-align: center;text-decoration: none;display: inline-block;font-size: 16px;margin: 4px 2px;cursor: pointer;" href="' . $accept_url . '">' . __('Approve Offer', 'offers-for-woocommerce') . '</a>');

} else {
printf(
'<div style="text-align: center;"><p style="font-size: 16px;text-align: center;font-family: inherit;"><strong>' . __('New offer submitted on', 'offers-for-woocommerce') . ' %s.</strong><br />' . __('To manage this offer please use the following link:', 'offers-for-woocommerce') . '</p> %s',
Expand Down

0 comments on commit 751a8b0

Please sign in to comment.