• Resolved paulmcgregory

    (@paulmcgregory)


    Hi, I′ve tested the free plugin for my wcfm marketplace and I am very interessted to buy the pro version.

    I am using WP 5.9, php8 and the martfury theme. The SCP currency switcher and the wfcm plugin works ok, but there are some issues:

    1) Some product prices are convertet to 0, like: 715.1 £ – 0.0 £, but those products has no special price.

    2) On all store manger the currency sitcher widget is not displaying

    3) The settings page of the wcfm vendor page gets a js error and does not load:

    Uncaught TypeError: jQuery(…).data(…).chosen is not a function
    at HTMLDocument.<anonymous> (scd_wcfm_multivendor.js?ver=5.9:55:82)

    How can I fix it?
    Best Regards

    The page I need help with: [log in to see the link]

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter paulmcgregory

    (@paulmcgregory)

    Hi, send you some data yesterday.

    I think the most problems are caused in the “SCD – Smart Currency Detector Variant for WCFM” plugin.

    One reason is a missing product id in scd_multivendors_renders.php:
    That solved issue no 1.

    function scd_product_html($price_html_base, $product) {
        global $wp;
        if((class_exists("WCFM_Products_Controller"))){
            $price_html = display_price_in_vendor_currency($product);
        }else{
            $price_html = check_variable_prices($product);
        	if($price_html==""){
        	   $price_html = check_simple_product_custom_prices($product,false);
        	}
    	
        	// Add this line
    	$product_id = $product->get_id();
    		
        	if($price_html==""){
        	   $price_html = check_simple_product_prices($product,$product_id);		
        	}
        }
    
        if($price_html != ""){
            $price_html_base = $price_html;
        } 
        return $price_html_base;
    }
    Thread Starter paulmcgregory

    (@paulmcgregory)

    Another line of the “scd-wcfm-adminreport-by-date.php

    function scd_wcfm_admin_dashboard_commission in line 36:
    Add table field order_id after commission_id:

    $orders_temp =$wpdb->get_results(‘SELECT ID as commission_id, order_id, total_commission as gross_sales FROM ‘.$wpdb->prefix.’wcfm_marketplace_orders WHERE order_status IN (“completed”,”processing”,”pending”)’);

    Original:
    $rate = scd_wcfm_get_order_rate($order->order_id);

    New:
    $rate = scd_wcfm_get_order_rate($single_order->order_id);

    • This reply was modified 2 years, 9 months ago by paulmcgregory.
    Thread Starter paulmcgregory

    (@paulmcgregory)

    Another function: check_variable_prices. returns an undefinied variable $price_html, if no product childred avaible

    Before:

    function check_variable_prices($product){
        if($product->get_children()){
            $array_price = array();
            $price_html = "";

    after

    function check_variable_prices($product){
        $price_html = "";
        if($product->get_children()){
            $array_price = array();
            
    Thread Starter paulmcgregory

    (@paulmcgregory)

    Next issue: The currency widget is only changing/reloading the currency, when the “Enable mobile currency conversion widget” is activated.

    If not, there is no reaction and no js error

    Thanks for inputs @paulmcgregory we soon start checking this … Best

    Thread Starter paulmcgregory

    (@paulmcgregory)

    Hi, you wished to post my mail conversation/issue reports here. (Sorry, just copy paste in germany)

    I fixed some bugs in the shopping cart:

    multivendor_renders.php (WCFM Komponente):

    $total_amount = $mysubtot + $ship_total + $total_tax;

    hier ist zuvor $total_tax nicht definiert und muss einfach weiter nach oben. Statt $total_tax = “” muss es auch einfach ein 0, dann stimmt der variabletyp.

    Zeile 270 ist das $args nicht definiert:
    $tax_html = scd_format_converted_price_to_html($tax_amount, $args);

    Hier habe ich ein paar davor ein paar hinzu gefügt:

    $vendor_currency= scd_get_user_currency();
    if($vendor_currency==false){
    $vendor_currency= get_option(‘woocommerce_currency’);
    }

    $args[‘decimals’] = scd_options_get_decimal_precision();
    $args[‘price_format’] = get_woocommerce_price_format();
    $args[‘currency’] = $vendor_currency;
    $args[‘price_format’] = scd_change_currency_display_format($args[‘price_format’], $vendor_currency);

    In der normalen Currency Detector Komponente habe ich die scd_renders.php in der zeile 598 angepasst:
    Einfach mit isset überprüfen:

    if ( $args[‘ex_tax_label’] && wc_tax_enabled() ) {

    in Zeile 589 / 900 ist das arrgument dezimal_seperator und thousand_separator

    Theoretisch tuts dieses, wenna auch über die funkion die args rein kommen und sicherlich anderswo besser/globaler positioniert sind

    $price = apply_filters(
    ‘formatted_woocommerce_price’, number_format( $price, $args[‘decimals’], wc_get_price_decimal_separator(), wc_get_price_thousand_separator() ), $price, $args[‘decimals’], wc_get_price_decimal_separator(), wc_get_price_thousand_separator() );

    Thread Starter paulmcgregory

    (@paulmcgregory)

    Wenn man nicht als Admin eingeloggt ist, funktioniert im WCFM der SCD Menüpunkt nicht.
    Zwar kommt über die admin-ajax.php route der richtige Inhalt, aber es wird nicht richtig abgearbeitet und es erscheint erneut das dashboard

    Gru?

    In progress @paulmcgregory update soon ….

    @paulmcgregory please Check the latest updates per mail a couple of minutes ago thank you

    @paulmcgregory please check the latest updates per mail a couple of minutes ago and confirm that the issue is sloved thank you

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘JS issues’ is closed to new replies.