Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter davera

    (@davera)

    Yes those options are enabled.

    Thread Starter davera

    (@davera)

    Ok so enabling Standard Tracking is now tracking remove_from_cart events but not add to cart.

    Any help with that part?

    Thread Starter davera

    (@davera)

    Thanks for taking the time. I figured it out though!

    The iris file included overrides the default WP iris, so I just called an another instance of that to override the CMB2 iris function as well so I could add my change callback in there as so:

    $.widget( 'a8c.iris', $.a8c.iris, {
    
      _change: function() {
          this._super();
    
          var self = this,
            el   = self.element;
    
          console.log('changed color');
          update_chart_colors();
        },
      });

    Works like a charm! Didn’t have to edit the core file or anything, just added that to my JS.

    Thread Starter davera

    (@davera)

    It’s just a function to refresh a graph preview section with the new colors, triggered after a user changes or adds a new color. It updates another function which outputs json to the page to be read by the graph:

    function update_chart_colors()
    {
    
      var fill_colors = [];
      var line_colors = [];
    
      $('.chart-bg-fill-color').each(function(){
        var curr_fill_color = $(this).find('input.wp-color-picker');
        fill_colors.push(curr_fill_color.val());
      });
    
      $('.chart-border-line-color').each(function(){
      var curr_color = $(this).find('input.wp-color-picker');
        if (curr_color != 'undefined') {
          line_colors.push(curr_color.val());
        }
      });
    
      update_chart('color_bg', fill_colors.toString());
      update_chart('color', line_colors.toString());
    
    }
    function update_chart(option, value){
    var curr_graph_setting = jQuery.parseJSON(document.getElementById('script-container-graph').innerHTML);
    curr_graph_setting[option] = value;
    var updated_json = JSON.stringify(curr_graph_setting);
    $('#script-container-HC-1').html(updated_json);
    
    }
    Thread Starter davera

    (@davera)

    Hey, didn’t want to start a new thread about this but the plugin isn’t returning shipping/billing addresses anymore.

    Just the names. The logs show that the addresses are being called but they’re not being printed out on the review order page.

    11-28-2016 @ 02:14:06 – Response: Array
    (
    [TOKEN] => EC-************
    [BILLINGAGREEMENTACCEPTEDSTATUS] => 0
    [CHECKOUTSTATUS] => PaymentActionNotInitiated
    [TIMESTAMP] => 2016-11-28T08:14:06Z
    [CORRELATIONID] => ************
    [ACK] => Success
    [VERSION] => 124.0
    [BUILD] => 000000
    [EMAIL] => ************
    [PAYERID] => ************
    [PAYERSTATUS] => verified
    [BUSINESS] => ************
    [FIRSTNAME] => ************
    [LASTNAME] => ************
    [COUNTRYCODE] => ************
    [SHIPTONAME] => ************
    [SHIPTOSTREET] => ************
    [SHIPTOCITY] => Grand Rapids
    [SHIPTOSTATE] => MI
    [SHIPTOZIP] => ************
    [SHIPTOCOUNTRYCODE] => US
    [SHIPTOCOUNTRYNAME] => United States
    [ADDRESSSTATUS] => Confirmed
    [CURRENCYCODE] => USD
    [AMT] => 8.78
    [ITEMAMT] => 7.00
    [SHIPPINGAMT] => 1.78
    [HANDLINGAMT] => 0.00
    [TAXAMT] => 0.00
    [INSURANCEAMT] => 0.00
    [SHIPDISCAMT] => 0.00
    [INSURANCEOPTIONOFFERED] => false
    [L_NAME0] => Product Name
    [L_NUMBER0] => BEAD
    [L_QTY0] => 1
    [L_TAXAMT0] => 0.00
    [L_AMT0] => 7.00
    [PAYMENTREQUEST_0_CURRENCYCODE] => USD
    [PAYMENTREQUEST_0_AMT] => 8.78
    [PAYMENTREQUEST_0_ITEMAMT] => 7.00
    [PAYMENTREQUEST_0_SHIPPINGAMT] => 1.78
    [PAYMENTREQUEST_0_HANDLINGAMT] => 0.00
    [PAYMENTREQUEST_0_TAXAMT] => 0.00
    [PAYMENTREQUEST_0_INSURANCEAMT] => 0.00
    [PAYMENTREQUEST_0_SHIPDISCAMT] => 0.00
    [PAYMENTREQUEST_0_SELLERPAYPALACCOUNTID] => ************
    [PAYMENTREQUEST_0_INSURANCEOPTIONOFFERED] => false
    [PAYMENTREQUEST_0_SHIPTONAME] => ************
    [PAYMENTREQUEST_0_SHIPTOSTREET] => ************
    [PAYMENTREQUEST_0_SHIPTOCITY] => Grand Rapids
    [PAYMENTREQUEST_0_SHIPTOSTATE] => MI
    [PAYMENTREQUEST_0_SHIPTOZIP] => ************
    [PAYMENTREQUEST_0_SHIPTOCOUNTRYCODE] => US
    [PAYMENTREQUEST_0_SHIPTOCOUNTRYNAME] => United States
    [PAYMENTREQUEST_0_ADDRESSSTATUS] => Confirmed
    [L_PAYMENTREQUEST_0_NAME0] => Product Name
    [L_PAYMENTREQUEST_0_NUMBER0] => BEAD
    [L_PAYMENTREQUEST_0_QTY0] => 1
    [L_PAYMENTREQUEST_0_TAXAMT0] => 0.00
    [L_PAYMENTREQUEST_0_AMT0] => 7.00
    [PAYMENTREQUESTINFO_0_ERRORCODE] => 0
    )

    I starred out details, but the shipping address/product info is in there.

    Thanks for the help.

Viewing 5 replies - 1 through 5 (of 5 total)