Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…erce into PFWA-2
  • Loading branch information
kcppdevelopers committed Feb 28, 2019
2 parents 82df8e7 + 1e3797f commit 45cecd4
Show file tree
Hide file tree
Showing 22 changed files with 388 additions and 14 deletions.
4 changes: 4 additions & 0 deletions angelleye-includes/angelleye-utility.php
Original file line number Diff line number Diff line change
Expand Up @@ -2226,6 +2226,10 @@ public static function angelleye_add_paypal_payment_meta($order_id, $payment_met
}
}

public static function angelleye_display_marketing_sidebar($id = null) {
wp_enqueue_style('angelleye_marketing_css');
require_once( PAYPAL_FOR_WOOCOMMERCE_PLUGIN_DIR . '/template/sidebar.php' );
}
public static function angelleye_get_push_notifications() {
$args = array(
'plugin_name' => 'paypal-for-woocommerce',
Expand Down
9 changes: 4 additions & 5 deletions assets/css/admin.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
float: left;
margin: 10px 0;
padding: 0 20px 10px;
width: 97%;
width: 824px;
}

.angelleye-paypal-for-woocommerce-shipping-tools-wrap .angelleye-paypal-for-woocommerce-shipping-tools-bulk-action-section {
Expand Down Expand Up @@ -53,7 +53,7 @@ table.angelleye_order_action_table td {
margin-bottom: 10px;
}

.angelleye_addons_wrap .products {
.angelleye_addons_wrap ul.products {
overflow: hidden;
}
.angelleye_addons_wrap .products li {
Expand Down Expand Up @@ -230,9 +230,8 @@ label[for=woocommerce_paypal_express_paypal_marketing_solutions_enabled] {
float: left;
}
#woocommerce_paypal_express_angelleye_smart_button_preview_title, .display_smart_button_previews, .display_smart_button_previews_button {

float: right;
margin-left: 100px;
margin: auto;
width: 50%;
}

#woocommerce_paypal_express_paypal_marketing_solutions {
Expand Down
178 changes: 178 additions & 0 deletions assets/css/angelleye-marketing-sidebar.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,178 @@
#angelleye-sidebar-container {
width: 280px;
padding: 0 0 0 19px;
}
.angelleye_content_cell {
display: table-cell;
height: 500px;
margin: 0;
padding: 0;
vertical-align: top;
}
.angelleye-sidebar__title {
box-sizing: border-box;
width: 100%;
margin: 5px 0;
padding: 10px 0;
border-bottom: 1px solid #63ab40;
color: #63ab40;
line-height: 19px;
text-align: left;
}
.angelleye-sidebar__section {
padding: 20px 0;
border-bottom: 1px solid #ddd;
}
.angelleye-sidebar__section h2 {
margin-top: 0;
width: 258px;
}
.angelleye-sidebar__section ul {
position: relative;
}
.angelleye-sidebar__section li {
margin-left: 20px;
list-style: none;
}
.angelleye-sidebar__section li::before {
position: absolute;
left: 0;
font-weight: 700;
content: "+";
}
.angelleye-sidebar__section li {
list-style: none;
}
.angelleye_content_wrapper li, .angelleye_content_wrapper p {
max-width: 600px;
}
.angelleye-button-upsell#angelleye-premium-button {
color: #000;
}
.screen-reader-text {
overflow: hidden;
clip: rect(1px,1px,1px,1px);
position: absolute !important;
width: 1px;
height: 1px;
padding: 0;
border: 0;
word-wrap: normal !important;
-webkit-clip-path: inset(50%);
clip-path: inset(50%);
}
.angelleye-button-upsell {
display: -ms-inline-flexbox;
display: inline-flex;
box-sizing: border-box;
min-height: 48px;
padding: 8px 1em;
border-radius: 4px;
color: #000;
background-color: #fec228;
box-shadow: inset 0 -4px 0 rgba(0,0,0,.2);
font-family: Arial,sans-serif;
font-size: 16px;
line-height: 1.5;
text-decoration: none;
align-items: center;
filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .2));
-ms-flex-align: center;
-ms-flex-pack: center;
justify-content: center;
}
.angelleye-sidebar__section {
padding: 20px 0;
border-bottom: 1px solid #ddd;
}
.angelleye-sidebar__section div {
position: relative;
}
.angelleye-sidebar__section div p {
width: 200px;
margin: 0;
padding-left: 50px;
}
.angelleye-sidebar__section div a {
color: #0085ba;
}
.angelleye-button-upsell:active, .angelleye-button-upsell:focus, .angelleye-button-upsell:hover {
color: #000;
background-color: #f2ae01;
}
.angelleye-button-upsell__caret {
width: 8px;
height: 16px;
margin: 0 -2px 0 6px;
background: url("data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%20192%20512%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%20role%3D%22img%22%20aria%2Dhidden%3D%22true%22%20focusable%3D%22false%22%3E%3Cpath%20fill%3D%22%23000%22%20d%3D%22M%200%20384%2E662%20V%20127%2E338%20c%200%20%2D17%2E818%2021%2E543%20%2D26%2E741%2034%2E142%20%2D14%2E142%20l%20128%2E662%20128%2E662%20c%207%2E81%207%2E81%207%2E81%2020%2E474%200%2028%2E284%20L%2034%2E142%20398%2E804%20C%2021%2E543%20411%2E404%200%20402%2E48%200%20384%2E662%20Z%22%2F%3E%3C%2Fsvg%3E") center no-repeat;
-ms-flex-negative: 0;
flex-shrink: 0;
}
.angelleye-sidebar__section a, .angelleye-sidebar__section h2 {
color: #63ab40;
}
.angelleye-sidebar__section h2 {
margin-top: 0;
}
.angelleye-sidebar__section div p {
width: 200px;
margin: 0;
padding-left: 50px;
}
.angelleye-sidebar__section div img, .angelleye-sidebar__section div p {
float: left;
}
.wpseo_content_wrapper li, .wpseo_content_wrapper p {
max-width: 600px;
}
.angelleye-sidebar__section div a {
color: #0085ba;
}
.angelleye-sidebar__section div img {
width: 40px;
height: 40px;
margin: 0 10px 0 -50px;
}
.angelleye-sidebar__section div img, .angelleye-sidebar__section div p {
float: left;
}
#angelleye_paypal_marketing_table {
display: table-cell;
height: 500px;
margin: 0;
padding: 0;
vertical-align: top;
border-right: 2px solid #dfdfdf;
width: 80%;
}
.angelleye-wizard-text-input-label {
display: block;
margin: .5em 0 0;
font-size: 14px;
cursor: pointer;
}
.angelleye-wizard-text-input-label {
font-weight: 700;
}
.angelleye-wizard input[type="email"] {
min-width: 250px;
}
.angelleye-wizard--columns .angelleye-wizard-text-input-field {
max-width: 100%;
}
.angelleye-wizard-text-input [type="email"] {
margin: .5em 0;
padding: 5px;
box-sizing: border-box;
width: 100%;
max-width: 450px;
}
.angelleye-wizard input{
margin: .5em 0;
padding: 5px;
font-size: 14px;
line-height: 140%;
}
.m10 {
margin: 10px 0;
}
Binary file added assets/images/marketing/CheckoutWC.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/marketing/angelleye_affiliate.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions assets/js/angelleye-admin.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
jQuery(function () {
var angelleye_paypal_marketing_table_width = jQuery('#angelleye_paypal_marketing_table').parents('div').width();
jQuery('#angelleye_paypal_marketing_table').css("width", angelleye_paypal_marketing_table_width + "px");
jQuery('body').bind('mousewheel DOMMouseScroll', function(e){
var angelleye_paypal_marketing_table_width = jQuery('#angelleye_paypal_marketing_table').parents('div').width();
jQuery('#angelleye_paypal_marketing_table').css("width", angelleye_paypal_marketing_table_width + "px");
});
var el_notice = jQuery(".angelleye-notice");
el_notice.fadeIn(750);
jQuery(".angelleye-notice-dismiss").click(function(e){
Expand Down
4 changes: 3 additions & 1 deletion classes/wc-gateway-braintree-angelleye.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ public function admin_options() {
?>
<h3><?php _e('Braintree', 'paypal-for-woocommerce'); ?></h3>
<p><?php _e($this->method_description, 'paypal-for-woocommerce'); ?></p>
<div id="angelleye_paypal_marketing_table">
<table class="form-table">
<?php
if (version_compare(WC_VERSION, '2.6', '<')) {
Expand Down Expand Up @@ -156,7 +157,8 @@ public function admin_options() {
});

</script>
</table> <?php
</table> </div><?php
AngellEYE_Utility::angelleye_display_marketing_sidebar($this->id);
}

/**
Expand Down
5 changes: 5 additions & 0 deletions classes/wc-gateway-paypal-advanced-angelleye.php
Original file line number Diff line number Diff line change
Expand Up @@ -691,6 +691,9 @@ public function admin_options() {
?>
<h3><?php _e('PayPal Advanced', 'paypal-for-woocommerce'); ?></h3>
<p><?php _e('PayPal Payments Advanced uses an iframe to seamlessly integrate PayPal hosted pages into the checkout process.', 'paypal-for-woocommerce'); ?></p>
<div id="angelleye_paypal_marketing_table">


<table class="form-table">
<?php
if(version_compare(WC_VERSION,'2.6','<')) {
Expand All @@ -711,6 +714,8 @@ public function admin_options() {
wp_enqueue_style('wp-color-picker');
?>
</table><!--/.form-table-->
</div>
<?php AngellEYE_Utility::angelleye_display_marketing_sidebar($this->id); ?>
<script type="text/javascript">
jQuery(document).ready(function ($) {
jQuery('.paypal_for_woocommerce_color_field').wpColorPicker();
Expand Down
3 changes: 3 additions & 0 deletions classes/wc-gateway-paypal-credit-cards-rest-angelleye.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ public function admin_options() {
?>
<h3><?php echo (!empty($this->method_title) ) ? $this->method_title : __('Settings', 'paypal-for-woocommerce'); ?></h3>
<?php echo (!empty($this->method_description) ) ? wpautop($this->method_description) : ''; ?>
<div id="angelleye_paypal_marketing_table">
<table class="form-table">
<?php
if(version_compare(WC_VERSION,'2.6','<')) {
Expand All @@ -95,6 +96,8 @@ public function admin_options() {
}
?>
</table>
</div>
<?php AngellEYE_Utility::angelleye_display_marketing_sidebar($this->id); ?>
<script type="text/javascript">
jQuery('#woocommerce_paypal_credit_card_rest_testmode').change(function () {
var sandbox = jQuery('#woocommerce_paypal_credit_card_rest_rest_client_id_sandbox, #woocommerce_paypal_credit_card_rest_rest_secret_id_sandbox').closest('tr'),
Expand Down
17 changes: 11 additions & 6 deletions classes/wc-gateway-paypal-express-angelleye.php
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ public function admin_options() {
?>
<h3><?php _e('PayPal Express Checkout', 'paypal-for-woocommerce'); ?></h3>
<p><?php _e($this->method_description, 'paypal-for-woocommerce'); ?></p>
<div id="angelleye_paypal_marketing_table">
<table class="form-table">
<?php
if(version_compare(WC_VERSION,'2.6','<')) {
Expand All @@ -194,7 +195,10 @@ public function admin_options() {
}
?>
</table>

</div>
<?php
AngellEYE_Utility::angelleye_display_marketing_sidebar($this->id);
add_thickbox();
$guest_checkout = get_option('woocommerce_enable_guest_checkout', 'yes');
if( 'yes' === get_option( 'woocommerce_registration_generate_username' ) && 'yes' === get_option( 'woocommerce_registration_generate_password' ) ) {
Expand Down Expand Up @@ -1400,11 +1404,12 @@ public function init_form_fields() {
<div><p>' . __('<b>Get insights</b> about your visitors and how they shop on your site.', 'wp-paypal-marketing-solutions') . '</p></div>
</div>
<div class="wrap pms-center-moreinfo">
<div>
<div><a href="#TB_inline?&width=889&height=558&inlineId=more-info-popup" class="thickbox"><button class="pms-view-more paypal-px-btn">More Info</button></a></div>
<div>
<div><a href="#TB_inline?&width=889&height=558&inlineId=more-info-popup" class="thickbox"><button class="pms-view-more paypal-px-btn">More Info</button></a></div>
</div>
</div>
</div>
</div>
</div>
</div>
', 'paypal-for-woocommerce' ),
);
$this->form_fields['paypal_marketing_solutions_enabled'] = array(
Expand All @@ -1414,7 +1419,7 @@ public function init_form_fields() {
'default' => 'no',
'class' => 'checkbox',
'desc_tip' => true,
'description' => __( 'This enables PayPal Marketing Solutions for valuable customer insights.' ),
'description' => __( 'This enables PayPal Marketing Solutions for valuable customer insights.', '' ),
);
$this->form_fields['paypal_marketing_solutions_cid_production'] = array(
'type' => 'hidden',
Expand All @@ -1424,7 +1429,7 @@ public function init_form_fields() {
$this->form_fields['paypal_marketing_solutions_details_note'] = array(
'type' => 'title',
'default' => '',
'description' => '<p class="font11">' . __("* As reported in Nielsen’s PayPal Credit Average Order Value Study for activity occurring from April 2015 to March 2016 (small merchants) and October 2015 to March 2016 (midsize merchants), which compared PayPal Credit transactions to credit and debit card transactions on websites that offer PayPal Credit as a payment option or within the PayPal Wallet. Nielsen measured 284890 transactions across 27 mid and small merchants. Copyright Nielsen 2016.", 'paypal-for-woocommerce') . '<hr>',
'description' => '<p class="font11">' . __("* As reported in Nielsen’s PayPal Credit Average Order Value Study for activity occurring from April 2015 to March 2016 (small merchants) and October 2015 to March 2016 (midsize merchants), which compared PayPal Credit transactions to credit and debit card transactions on websites that offer PayPal Credit as a payment option or within the PayPal Wallet. Nielsen measured 284890 transactions across 27 mid and small merchants. Copyright Nielsen 2016.", 'paypal-for-woocommerce') . '</p><hr>',
);
}
$this->form_fields = apply_filters('angelleye_ec_form_fields', $this->form_fields);
Expand Down
3 changes: 3 additions & 0 deletions classes/wc-gateway-paypal-pro-angelleye.php
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,7 @@ public function admin_options() {
echo '<h2>' . esc_html( $this->get_method_title() ) . '</h2>';
echo wp_kses_post( wpautop( $this->get_method_description() ) );
?>
<div id="angelleye_paypal_marketing_table">
<table class="form-table">
<?php
if(version_compare(WC_VERSION,'2.6','<')) {
Expand All @@ -444,6 +445,8 @@ public function admin_options() {
}
?>
</table>
</div>
<?php AngellEYE_Utility::angelleye_display_marketing_sidebar($this->id); ?>
<script type="text/javascript">
jQuery('#woocommerce_paypal_pro_payment_action').change(function () {
if ( this.value === 'Authorization' ) {
Expand Down
3 changes: 3 additions & 0 deletions classes/wc-gateway-paypal-pro-payflow-angelleye.php
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,7 @@ public function admin_options() {
echo wp_kses_post( wpautop( $this->get_method_description() ) );
echo $this->angelleye_paypal_pro_payflow_reference_transaction_notice();
?>
<div id="angelleye_paypal_marketing_table">
<table class="form-table">
<?php
if(!get_user_meta(get_current_user_id(), 'payflow_sb_autopopulate_credentials')){
Expand All @@ -451,6 +452,8 @@ public function admin_options() {

?>
</table>
</div>
<?php AngellEYE_Utility::angelleye_display_marketing_sidebar($this->id); ?>
<script type="text/javascript">
jQuery('#woocommerce_paypal_pro_payflow_payment_action').change(function () {
if ( this.value === 'Authorization' ) {
Expand Down
5 changes: 4 additions & 1 deletion paypal-for-woocommerce.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,14 +198,16 @@ function set_ignore_tag(){
global $current_user;
$plugin = plugin_basename( __FILE__ );
$plugin_data = get_plugin_data( __FILE__, false );

if ( !in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) && !is_plugin_active_for_network( 'woocommerce/woocommerce.php' ) ) {
if(!empty($_GET['action']) && !in_array($_GET['action'], array('activate-plugin', 'upgrade-plugin','activate','do-plugin-upgrade')) && is_plugin_active($plugin) ) {
deactivate_plugins( $plugin );
wp_die( "<strong>".$plugin_data['Name']."</strong> requires <strong>WooCommerce</strong> plugin to work normally. Please activate it or install it from <a href=\"http://wordpress.org/plugins/woocommerce/\" target=\"_blank\">here</a>.<br /><br />Back to the WordPress <a href='".get_admin_url(null, 'plugins.php')."'>Plugins page</a>." );
}
}

require_once( PAYPAL_FOR_WOOCOMMERCE_PLUGIN_DIR . '/template/sidebar-process.php' );

$user_id = $current_user->ID;

/* If user clicks to ignore the notice, add that to their user meta */
Expand Down Expand Up @@ -642,6 +644,7 @@ public function angelleye_woocommerce_admin_enqueue_scripts($hook) {
wp_enqueue_script( 'deactivation-modal', PAYPAL_FOR_WOOCOMMERCE_ASSET_URL . 'assets/js/deactivation-form-modal.js', null, VERSION_PFW, true );
wp_localize_script( 'deactivation-modal', 'angelleye_ajax_data', array( 'nonce' => wp_create_nonce( 'angelleye-ajax' ) ) );
}
wp_enqueue_style( 'angelleye_marketing_css', plugins_url( 'assets/css/angelleye-marketing-sidebar.css' , __FILE__ ), array(), VERSION_PFW );
}

public function angelleye_woocommerce_pfw_ed_shipping_bulk_tool() {
Expand Down
Loading

0 comments on commit 45cecd4

Please sign in to comment.