Title: JS issues
Last modified: February 6, 2022

---

# JS issues

 *  Resolved [paulmcgregory](https://wordpress.org/support/users/paulmcgregory/)
 * (@paulmcgregory)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/js-issues-2/)
 * 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](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fjs-issues-2%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Thread Starter [paulmcgregory](https://wordpress.org/support/users/paulmcgregory/)
 * (@paulmcgregory)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/js-issues-2/#post-15341419)
 * 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](https://wordpress.org/support/users/paulmcgregory/)
 * (@paulmcgregory)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/js-issues-2/#post-15341661)
 * 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 4 years, 3 months ago by [paulmcgregory](https://wordpress.org/support/users/paulmcgregory/).
 *  Thread Starter [paulmcgregory](https://wordpress.org/support/users/paulmcgregory/)
 * (@paulmcgregory)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/js-issues-2/#post-15341905)
 * 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](https://wordpress.org/support/users/paulmcgregory/)
 * (@paulmcgregory)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/js-issues-2/#post-15341930)
 * 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
 *  [gajelabs1](https://wordpress.org/support/users/gajelabs1/)
 * (@gajelabs1)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/js-issues-2/#post-15341968)
 * Thanks for inputs [@paulmcgregory](https://wordpress.org/support/users/paulmcgregory/)
   we soon start checking this … Best
 *  Thread Starter [paulmcgregory](https://wordpress.org/support/users/paulmcgregory/)
 * (@paulmcgregory)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/js-issues-2/#post-15345701)
 * 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](https://wordpress.org/support/users/paulmcgregory/)
 * (@paulmcgregory)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/js-issues-2/#post-15345703)
 * 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ß
 *  [gajelabs1](https://wordpress.org/support/users/gajelabs1/)
 * (@gajelabs1)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/js-issues-2/#post-15358372)
 * In progress [@paulmcgregory](https://wordpress.org/support/users/paulmcgregory/)
   update soon ….
 *  [gajelabs1](https://wordpress.org/support/users/gajelabs1/)
 * (@gajelabs1)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/js-issues-2/#post-15361312)
 * [@paulmcgregory](https://wordpress.org/support/users/paulmcgregory/) please Check
   the latest updates per mail a couple of minutes ago thank you
 *  [gajelabs1](https://wordpress.org/support/users/gajelabs1/)
 * (@gajelabs1)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/js-issues-2/#post-15363681)
 * [@paulmcgregory](https://wordpress.org/support/users/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.

 * ![](https://ps.w.org/scd-smart-currency-detector/assets/icon-128x128.jpg?rev=
   2332610)
 * [SCM - Smart Currency Manager](https://wordpress.org/plugins/scd-smart-currency-detector/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/scd-smart-currency-detector/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/scd-smart-currency-detector/)
 * [Active Topics](https://wordpress.org/support/plugin/scd-smart-currency-detector/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/scd-smart-currency-detector/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/scd-smart-currency-detector/reviews/)

 * 10 replies
 * 2 participants
 * Last reply from: [gajelabs1](https://wordpress.org/support/users/gajelabs1/)
 * Last activity: [4 years, 3 months ago](https://wordpress.org/support/topic/js-issues-2/#post-15363681)
 * Status: resolved