Forum Replies Created

Viewing 50 posts - 1 through 50 (of 52 total)
  • Author
    Posts
  • in reply to: Licence error message after upgrade to 1.4.4 #69841
    Aaron Roessler
    Participant

    I’m also seeing this same error message after update to 1.4.4. I’ll continue to use Pro as usual.

    in reply to: product edit page default values #60109
    Aaron Roessler
    Participant

    I also wanted to use functions.php to filter the Stock QTY and Price to set default values. but the code provided prevents changing it to any other value.

    So I wrote some jQuery code that checks if these fields are empty, if YES then set the value. in my case I needed to set Price to “0” and Stock to “1” if they were empty.

    This was added to product-edit.php

    
    jQuery(document).ready(function(){
    var value=$.trim($("#_regular_price").val());
    var value=$.trim($("#_stock").val());
    
      if ($('#_regular_price').val()==""){
      $('#_regular_price').val("0");
      }
      if ($('#_stock').val()==""){
      $('#_stock').val("1");
      }
    });
    
    
    in reply to: Offers for WooCommerce Compatibility #60016
    Aaron Roessler
    Participant

    Hey @ANGELLEYE, on your WC Offers for WC Vendors plugin page it shows preview images of backend managment of offers? https://www.angelleye.com/product/offers-for-woocommerce-wc-vendors/

    I want to purchase it but need to make sure each Vendor can manage this from their own Front End dashboard… will they have a new TAB in their dashboard page?

    Please update the photos or send me screenshots,

    Thanks

    in reply to: Offers for WooCommerce Compatibility #59981
    Aaron Roessler
    Participant

    WOW… quick response and great news! thanks again for all your hard work and speedy delivery.

    in reply to: Offers for WooCommerce Compatibility #59975
    Aaron Roessler
    Participant

    @ANGELLEYE is this done yet? with Front End management via WC Vendors?

    in reply to: Vendor Register redirect #59835
    Aaron Roessler
    Participant

    Ok that code works! but I want them to be directed to product tab. here: https://reusesb.com/dashboard/product

    I modified the code but still only goes to main dashboard tab.

    add_filter('woocommerce_login_redirect', 'login_redirect', 10, 2);
    function login_redirect( $redirect_to, $user ) {
        if (class_exists('WCV_Vendors') && class_exists('WCVendors_Pro') && WCV_Vendors::is_vendor( $user->id ) ) {
            $redirect_to =  'https://reusesb.com/dashboard/product';
        }
        return $redirect_to;
    }
    in reply to: Edit/remove Dashboard menu items #59263
    Aaron Roessler
    Participant

    Yes… using Buddyboss Social Marketplace. So now that I now that this is a Theme specific settings I will narrow my search to find out where to make this change. Unless you already know the answer to how I can remove it?

    in reply to: Accept Terms for Regular Registration #59244
    Aaron Roessler
    Participant

    This is almost what I need 🙂 Maybe you can help tweak this a bit. My Register form has a checkbox for Terms and Conditions but it only shows up when the user checks a box “CHECK THIS TO SELL ON REUSESB”. I would like the Terms and Conditions checkbox to always be visible and be required by both regular non-vendor signups and vendors.

    I have this code in my functions that displays the first checkbox “CHECK THIS TO SELL ON REUSESB”

    add_filter( 'wcvendors_vendor_registration_checkbox', 'custom_wcvendors_vendor_registration_checkbox', 10, 1 );
    function custom_wcvendors_vendor_registration_checkbox( $message ) {
        $message = ' <i class="fa fa-hand-o-left fa-lg" ></i>  CHECK THIS TO SELL ON REUSESB';
        return $message;
    }

    MY PAGE HERE… https://reusesb.com/my-account/

    in reply to: Make fields mandatory on vendor registration form #59007
    Aaron Roessler
    Participant

    The *required paypal code you provided above works great… but the only issue is that if they are on the Store Tab section and click the Apply To Be Vendor button on that tab page nothing happens… no error or anything. The person would only know that that the paypal field is required if they click the Payment Tab to see the error message “THIS FIELD IS REQUIRED. YOUR PAYPAL ADDRESS IS USED TO SEND YOU YOUR COMMISSION”

    in reply to: Offers for WooCommerce Compatibility #56056
    Aaron Roessler
    Participant

    I’m also VERY interested when this will be fully compatible with WC Vendors Pro.

    in reply to: Allow Vendor to opt-out of Local Pickup delivery option #55649
    Aaron Roessler
    Participant

    Hey @GXM245. i also need the same functionality of disabling the Local Pickup option Per Product that can be set by the vendor from front end. I’ve done something very similar that allows the vendor to change the Commission Percentage per product. The “WooCommerce Conditional Shipping” is too complex for my intermediate skill level of coding. But here is how I was able to add a checkbox and dropdown menu to set the commission rate for that product in the admin area from the Add Product Front End (product-edit.php).

    I know this does not solve your problem but maybe someone can edit this code to have it Set the “WooCommerce Conditional Shipping” options just like I did here for the Products Commission.

    Here is the code that adds the checkbox in the front end form (product-edit.php)

    
    WCVendors_Pro_Form_Helper::input( apply_filters( 'wcv_product_give_product_commission', array( 
    	 	'post_id' 		=> $object_id, 
    	 	'id'	 			=> 'give_product_commission', 
    	 	'label' 			=> __( 'Give Percentage to ReUseSB', 'wcvendors-pro' ),
    		'wrapper_start' 	=> '',
    		'wrapper_end' 	=> '', 
    	 	'type' 			=> 'checkbox'
    	 ))
    );			
    	
    

    //Here is the Dropdown menu with pre set percentage values. Also goes in (product-edit.php)

    
    WCVendors_Pro_Form_Helper::select( array( 
     'type'      => 'number',
     'post_id'   => $object_id, 
     'id'     => '_wcv_custom_product_percentage_to_afs', 
     'label'    => __( 'Select Percentage donation to ReUseSB', 'wcvendors-pro' ), 
     'wrapper_start' 	=> '',
     'wrapper_end' 	=> '', 
     'placeholder'   => __( '', 'wcvendors-pro' ), 
     'desc_tip'    => 'true', 
     'description'   => __( 'Select Percentage of product cost that will donated to ReUseSB.', 'wcvendors-pro' ), 
      'options' 		  	=> array(
    							''     	=> __( '- Select Percentage -', 'wcvendors-pro' ),
    							'10' 			=> __( 'minimum is 10%', 'wcvendors-pro' ),
    							'15'    		=> __( '15%', 'wcvendors-pro' ),
    							'20'     		=> __( '20%', 'wcvendors-pro' ),
    							'25' 			=> __( '25%', 'wcvendors-pro' ),
    							'30'    		=> __( '30%', 'wcvendors-pro' ),
    							'35' 			=> __( '35%', 'wcvendors-pro' ),
    							'40'    		=> __( '40%', 'wcvendors-pro' ),
    							'45'     		=> __( '45%', 'wcvendors-pro' ),
    							'50' 			=> __( '50%', 'wcvendors-pro' ),
    							'55' 			=> __( '55%', 'wcvendors-pro' ),
    							'65'    		=> __( '65%', 'wcvendors-pro' ),
    							'70' 			=> __( '70%', 'wcvendors-pro' ),
    							'75'    		=> __( '75%', 'wcvendors-pro' ),
    							'80'     		=> __( '80%', 'wcvendors-pro' ),
    							'85' 			=> __( '85%', 'wcvendors-pro' ),
    							'90'    		=> __( '90%', 'wcvendors-pro' ),
    							'95' 			=> __( '95%', 'wcvendors-pro' ),
    							'100' 			=> __( '100%', 'wcvendors-pro' )
          ),  
        )
      );
    
    WCVendors_Pro_Form_Helper::input( array(  
    'type' 				=> 'text',
    'post_id'			=> $object_id, 
    'id' 				=> '_wcv_custom_product_percentage_to_vendor', 
    'label' 			=> __( 'Percentage to You', 'wcvendors-pro' ), 
    'wrapper_start' 	=> '',
    'wrapper_end' 	=> '', 
    'placeholder' 		=> __( '', 'wcvendors-pro' ), 
    'desc_tip' 			=> 'true', 
    'description' 		=> __( 'Percentage.', 'wcvendors-pro' ),
    'readonly' 		=> ''
    			)
    		 );
    

    // and some javascript that sets the percentage number value. also goes in (product-edit.php). I put this at the very top of page.

    
    
    jQuery(document).ready(function(){
    if ($('input[type="checkbox"]#give_product_commission').is(':checked')){
    $('.show-afs').show();
    } else { 
    $('.show-afs').hide();
    }
    
    $('#give_product_commission').click(function(){
    
    if ($('input[type="checkbox"]#give_product_commission').is(':checked')){
    $('.show-afs').show();
    } else { 
    $('.show-afs').hide();
    }
    });
    
    $('#_wcv_custom_product_percentage_to_vendor').focus(function(){
    $('#_wcv_custom_product_percentage_to_vendor').blur();
    });
    
        // Pre populated array of data
    var myData = new Array();
        myData[0] = '100';
        myData[5] = '95';
        myData[10] = '90';
        myData[15] = '85';
        myData[20] = '80';
        myData[25] = '75';
        myData[30] = '70';
        myData[35] = '65';
        myData[40] = '60';
        myData[45] = '55';
        myData[50] = '50';
        myData[55] = '45';
        myData[60] = '40';
        myData[65] = '35';
        myData[70] = '30';
        myData[75] = '25';
        myData[80] = '20';
        myData[85] = '15';
        myData[90] = '10';
        myData[95] = '5';
    document.getElementById("_wcv_custom_product_percentage_to_afs").onchange = updatePercent;
    
    function updatePercent() {
    var obj_sel = document.getElementById("_wcv_custom_product_percentage_to_afs");
    var percenttovendor = document.getElementById("_wcv_custom_product_percentage_to_vendor");
    
      };		 }); 
    

    This goes in Functions.php

    
    function update_product_commission ($post_id) {
    $wcv_percentage_to_pay = get_post_meta( $post_id, '_wcv_custom_product_percentage_to_vendor', true );
    
    $give_to_afs = isset( $_POST['give_product_commission'] ) ? 'yes' : 'no';
    update_post_meta( $post_id, 'give_product_commission', $give_to_afs );
    
    if (isset($_POST['give_product_commission'])) {
    update_post_meta( $post_id, 'wcv_commission_type', 'percent' );
    update_post_meta( $post_id, 'wcv_commission_percent', ( float ) $_POST[ 'wcv_commission_percent' ] );
    
    	if( !empty( $wcv_percentage_to_pay ) ){
    update_post_meta( $post_id, 'wcv_commission_percent', $wcv_percentage_to_pay );
    }
    else if 	( empty( $wcv_percentage_to_pay ) ){
    update_post_meta( $post_id, 'wcv_commission_percent', '10' );
    }
        } else { 
    		delete_post_meta( $post_id, 'wcv_commission_type');
     		delete_post_meta( $post_id, 'wcv_commission_percent');
     		delete_post_meta( $post_id, 'wcv_commission_amount');
     		delete_post_meta( $post_id, 'wcv_commission_fee');
        }
    }
     add_action ('wcv_save_product','update_product_commission', 10, 1);
    
    in reply to: Payment Schedule Error #47375
    Aaron Roessler
    Participant

    I FIXED IT!!! and NO THANKS TO BOOHOST!! sorry BLUEHOST. who kept telling me the WC Vendor plugin is the issue even after I told them I have this same install setup on another testing server and it works just fine which tells me its NOT a plugin issue… its a Server config issue! sheesh.

    For anyone with a Bluehost account and this same error here’s how to fix. in your cPanel go to PHP Config and set it to PHP 5.6 (Single php.ini) Same as PHP 5.6, but all subdirectories will use ~/public_html/php.ini

    Then on your server, open up that php.ini file and search for “oAuth” and comment out that line of code. (look for other instances of it since i found duplicates!) you can comment out that line by adding a semicolon ; or just delete that line.

    ; extension=oauth.so

    in reply to: Payment Schedule Error #47372
    Aaron Roessler
    Participant

    OK… well, @ben thanks for your assistance and logging into my site to check on this issue. working with Bluehost to resolve. The error_log was in wp-admin folder… i was looking at the wordpress root folder.

    Here is the error. I will report back when Bluehost figures this out.

    [11-Nov-2016 13:58:00 America/Denver] PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/php/56/usr/lib64/php/modules/http.so' - /usr/php/56/usr/lib64/php/modules/http.so: cannot open shared object file: No such file or directory in Unknown on line 0
    [11-Nov-2016 13:58:00 America/Denver] PHP Warning:  Module 'magickwand' already loaded in Unknown on line 0
    [11-Nov-2016 13:58:00 America/Denver] PHP Warning:  Module 'mailparse' already loaded in Unknown on line 0
    [11-Nov-2016 13:58:00 America/Denver] PHP Warning:  Module 'OAuth' already loaded in Unknown on line 0
    [11-Nov-2016 13:58:00 America/Denver] PHP Warning:  Module 'oci8' already loaded in Unknown on line 0
    [11-Nov-2016 13:58:00 America/Denver] PHP Warning:  Module 'uploadprogress' already loaded in Unknown on line 0
    [11-Nov-2016 20:58:01 UTC] PHP Warning:  Missing argument 2 for wpdb::prepare(), called in /home3/loaspace/public_html/reusesb2/wp-content/plugins/wc-vendors/classes/class-commission.php on line 202 and defined in /home3/loaspace/public_html/reusesb2/wp-includes/wp-db.php on line 1285
    [11-Nov-2016 20:58:01 UTC] PHP Fatal error:  Cannot redeclare class OAuthException in /home3/loaspace/public_html/reusesb2/wp-content/plugins/wc-vendors/classes/gateways/PayPal_Masspay/api/lib/auth/PPAuth.php on line 0
    
    in reply to: Payment Schedule Error #47371
    Aaron Roessler
    Participant

    Here’s more info that may tell us the problem is with BlueHost? I just recently just signed up with another Hosting Company “FlyWheel”. They offered a free transfer of this site over to them and it just finished a few min ago… So I thought i would login and test the Payment Schedule ‘NOW’ option. I expected to get errors of course but at least this time I got a different error. Not sure if this helps to pinpoint the issue to my Current Bluehost account but here is the message i got from the Flywheel setup when clicking Pay ‘NOW’

    Failure. Insufficient funds (10321): The account does not have sufficient funds to do this masspay.
    Payment total: $8.30

    Here is System Report from FLyWheel

    
    ### WordPress Environment ###
    
    Home URL: http://perfect-cloud.flywheelsites.com
    Site URL: http://perfect-cloud.flywheelsites.com
    WC Version: 2.6.8
    Log Directory Writable: ✔
    WP Version: 4.6.1
    WP Multisite: –
    WP Memory Limit: 128 MB
    WP Debug Mode: –
    WP Cron: ✔
    Language: en_US
    
    ### Server Environment ###
    
    Server Info: Flywheel/4.1.0
    PHP Version: 5.6.27-1+deb.sury.org~precise+1
    PHP Post Max Size: 300 MB
    PHP Time Limit: 30
    PHP Max Input Vars: 4000
    cURL Version: 7.22.0
    OpenSSL/1.0.1
    
    SUHOSIN Installed: –
    MySQL Version: ❌ 5.5.52 - We recommend a minimum MySQL version of 5.6. See: WordPress Requirements
    Max Upload Size: 300 MB
    Default Timezone is UTC: ✔
    fsockopen/cURL: ✔
    SoapClient: ✔
    DOMDocument: ✔
    GZip: ✔
    Multibyte String: ✔
    Remote Post: ✔
    Remote Get: ✔
    
    ### Database ###
    
    WC Database Version: 2.6.8
    : 
    woocommerce_sessions: ✔
    woocommerce_api_keys: ✔
    woocommerce_attribute_taxonomies: ✔
    woocommerce_downloadable_product_permissions: ✔
    woocommerce_order_items: ✔
    woocommerce_order_itemmeta: ✔
    woocommerce_tax_rates: ✔
    woocommerce_tax_rate_locations: ✔
    woocommerce_shipping_zones: ✔
    woocommerce_shipping_zone_locations: ✔
    woocommerce_shipping_zone_methods: ✔
    woocommerce_payment_tokens: ✔
    woocommerce_payment_tokenmeta: ✔
    MaxMind GeoIP Database: ✔
    
    ### Active Plugins (5) ###
    
    MarketPlace: by BuddyBoss – 1.2.0
    BuddyPress: by The BuddyPress Community – 2.7.2
    WC Vendors Pro: by WC Vendors – 1.3.7
    WC Vendors: by WC Vendors – 1.9.6
    WooCommerce: by WooThemes – 2.6.8
    
    ### Settings ###
    
    Force SSL: –
    Currency: USD ($)
    Currency Position: left
    Thousand Separator: ,
    Decimal Separator: .
    Number of Decimals: 2
    
    ### API ###
    
    API Enabled: ✔
    
    ### WC Pages ###
    
    Shop Base: #22 - /shop/
    Cart: #23 - /cart/
    Checkout: #24 - /checkout/
    My Account: #25 - /my-account/
    
    ### Taxonomies ###
    
    Product Types: external (external)
    grouped (grouped)
    simple (simple)
    variable (variable)
    
    ### Theme ###
    
    Name: OneSocial Child Theme
    Version: 1.1.3
    Author URL: http://www.buddyboss.com
    Child Theme: ✔
    Parent Theme Name: OneSocial
    Parent Theme Version: 1.2.0
    Parent Theme Author URL: http://www.buddyboss.com
    WooCommerce Support: ✔
    
    ### Templates ###
    
    Overrides: onesocial-child/woocommerce/archive-product.php
    onesocial-child/woocommerce/myaccount/form-login.php
    
    ### WC Vendors Pro ###
    
    Theme Compatability: -
    Pro Dashboard Page: - #35
    Feedback form page: - #36
    Vendor Shop Permalink: - vendors/
    
    ### Templates ###
    
    Overrides: onesocial-child/wc-vendors/front/vendor-signup-form.php
    
    in reply to: Payment Schedule Error #47367
    Aaron Roessler
    Participant

    PHP is now set to PHP 5.6 (FastCGI)

    but the problem is still there and System Status is all good.

    in reply to: Payment Schedule Error #47366
    Aaron Roessler
    Participant

    woah woah woah!! I certainly apologize!! but how could my PHP version change within the last 12 hours?? if you look above at my original post you can see that my PHP version is PHP Version: 5.6.27.

    I definitely looked for any issues in the report already and did not see anything ‘red’ until just now. So i have no idea how the php version could have changed.

    so confused.

    I will update PHP and report back asap.

    in reply to: Payment Schedule Error #47363
    Aaron Roessler
    Participant

    WP Login
    Art From Scrap
    @ Explore Ecology

    in reply to: Payment Schedule Error #47361
    Aaron Roessler
    Participant

    I’ve troubleshooted for plenty of hours on this issue but am out of ideas. I’ve done a ton of testing on PayPal side too…

    here is my login if you want to quickly take a look.

    WordPress Login
    Art From Scrap
    @ Explore Ecology

    FTP Login:
    http://ftp.loaspace.com
    [email protected]
    R77 aceman

    in reply to: Payment Schedule Error #47360
    Aaron Roessler
    Participant

    ok great… glad you think its easy. buuuuuut. i’m stumped because I only have WooCommerce and WC Vendors free activated, I’ve even moved all other plugins OUT of the plugins folder…. and I’ve tried both Storefront theme and TwentyFifteen. Still same problem.

    any more ideas?

    in reply to: Payment Schedule Error #47358
    Aaron Roessler
    Participant

    PHP Fatal error: Cannot redeclare class OAuthException in /home3/loaspace/public_html/reusesb2/wp-content/plugins/wc-vendors/classes/gateways/PayPal_Masspay/api/lib/auth/PPAuth.php on line 42

    in reply to: Wanting to clear up some confusion about manual vendor payments #47354
    Aaron Roessler
    Participant

    Let me explain how I would like to pay vendors then you can assist how to achieve.

    I want to use PayPal to pay Vendors using the Payment Schedule ‘Now’ option.

    Payment Tab
    Commission Screen

    Aaron Roessler
    Participant

    I do not see the answer to this question in your reply.

    Is there anyway to pay for an order or vendor specifically without the payment applying to all other vendors with pending balances?

    For manual pay- yes you can pay vendors individually using whatever schedule and method you wish

    Ok. how? If I have two vendors with DUE commission. How can I only pay one of the vendors?

    in reply to: Product Form Conditional Logic #46798
    Aaron Roessler
    Participant

    hello @marc.bovet Here’s my gist here. https://gist.github.com/aaronkine

    That has more info than your asking but you may find it helpful.

    Here is the specific part that will save the value of the custom field. This need to be fired within the action

    My checkbox field ID is (give_product_commission)

    
    function save_my_checkbox_state ($post_id) {
    
    $my_checkbox = isset( $_POST['give_product_commission'] ) ? 'yes' : 'no';
    update_post_meta( $post_id, 'give_product_commission', $my_checkbox );
    }
    add_action ('wcv_save_product','save_my_checkbox_state', 10, 1);
    
    in reply to: Love the new commissions filter and theme! #46685
    Aaron Roessler
    Participant

    Hey @ben. Hope all is well. We’re lovin WC Vendors Pro! thanks.

    Is it ok if @thehappycouponer shares the code you did for her on her site?

    Thanks in advance.

    in reply to: Love the new commissions filter and theme! #46652
    Aaron Roessler
    Participant

    I am very interested in your excitement @thehappycouponer and what Ben and Jaime did to allow you to calculate commissions better. tell me more please.

    For my website I would like each vendors dashboard to show/export more data…. especially commission amounts. I have created custom code in product-edit.php which adds a checkbox and fields that setup the percentage/commission per product. I need the vendor to have access to much more detail in their reports including the commission split payment to the admin and buyer.

    Aaron Roessler
    Participant

    I also would like to know more on this subject. following.

    in reply to: Vendor Shipping not Working #46512
    Aaron Roessler
    Participant

    I FINALLY figured out whats wrong!! at least in my case. I was using code in my functions.php that would auto assign you as a Vendor and skip the Approval Process, In doing so, it was also skipping the Application form. And that caused the error because no vendor set their “country”… and so since all the products only had National Shipping Costs setup so the Cart was seeing these Vendors as “Rest of the World” which looks at the International Shipping options for those products. but since those fields were empty i kept getting the “There are no shipping methods available” error.

    in reply to: vendor sign up form #46500
    Aaron Roessler
    Participant

    I would also like to know how to make certain fields required for the Store Details Form.

    I need to make all Vendors Country required… or at least auto set to United States.

    in reply to: Vendor Shipping not Working #46341
    Aaron Roessler
    Participant

    I’m having a tough time understanding the whole shipping setup. I could not find enough information in the KB to help.

    I also am getting the same message “There are no shipping methods available. Please double check your address, or contact us if you need any help.”

    any pointers will help. thanks

    in reply to: Commission Only on 1 product of cart w/same vendor #46104
    Aaron Roessler
    Participant

    Done! v1.0.4 of Stripe is now released. You can download it from your https://www.wcvendors.com/my-account/ area.

    I only see version 1.0.3 in my downloads area? how can i get 1.0.4?

    even your “Our Plugins” page only shows Stripe @ v. 1.0.3 ?

    in reply to: Understanding a general transaction #40552
    Aaron Roessler
    Participant

    I’m going to create a fresh install and see if that fixes this issue. I’ll report back here when done.

    in reply to: Understanding a general transaction #40549
    Aaron Roessler
    Participant

    Commission Pro Settings is set to Percentage 90%

    i DO have instant pay checked ON.

    When I view the 10$ product the Commission drop down menu is blank, nothing selected. So where else should I look for any overrides that may be affecting the Global Commission setting i set to 90% ?

    I disabled ALL undeeded plugins, installed the Storefront Theme for testing and the same problem… 10$ goes straight to Admin and nothing to Seller.

    Seller Paypal address is: [email protected]
    Admin is: [email protected]
    Buyer is: [email protected]

    For some reason the Admin is getting the full 10$ ? maybe there is something wrong with PayPal Sandbox?

    Wordpress 4.6
    One-Social Child theme with Marketplace plugin 1.1.2
    WooCommerce System Status:
    The only erros are:
    PHP Version: 5.4.43 We recommend a minimum PHP version of 5.6
    MySQL Version: 5.5.42 – We recommend a minimum MySQL version of 5.6

    in reply to: Pro Local Pickup Option? #31043
    Aaron Roessler
    Participant

    I am very excited I found this thread with others sharing the same issue.

    Example: if a customer adds 2 products from 2 different vendors they might want the 1 product to be pickup and the other be shipping. The way it is now you have to pick one option

    ….here to help anyway possible… but I’m not a coder.

    in reply to: Product Form Conditional Logic #29048
    Aaron Roessler
    Participant

    Not sure if this will help you @jarvo but I used Javascript to achieve (conditional logic) only show some attributes when they clicked my custom CheckBox Field.

    <script type="text/javascript">
    jQuery(document).ready(function(){
    //on page load check if checkbox is checked... if checked then show the attributes.
    if ($('input[type="checkbox"]#THE ID OF MY CHECKBOX').is(':checked')){
    $('.show-afs').show();
    } else { 
    $('.show-afs').hide();
    }
    
    //on CHECKBOX CLICK toggle the attributes... if checked then show the attributes, if unchecked hide attributes.
    $('#THE ID OF MY CHECKBOX').click(function(){
    
    if ($('input[type="checkbox"]#THE ID OF MY CHECKBOX').is(':checked')){
    $('.show-afs').show();
    } else { 
    $('.show-afs').hide();
    }
    });
    </script>

    and here is the php code related to the javascript above: NOTE: i used wrapper_start and wrapper_end to wrap the attributs in the div with class “show-afs” mentioned above. but you could also just manually add your DIVs and wrap what you want to hide.

    <?php
    // THIS IS THE CHECKBOX THAT WILL TOGGLE THE INPUT FIELD BELOW.
    WCVendors_Pro_Form_Helper::input( apply_filters( 'wcv_product_enable_fp_paypal_adaptive', array( 
    'post_id' 	=> $object_id, 
    'id'	 	=> '_enable_fp_paypal_adaptive', //THIS IS THE ID YOU USE ABOVE IN THE JAVASCRIPT if ($('input[type="checkbox"]#THE ID OF MY CHECKBOX')
    'label' 	=> __( 'Give Percentage to Art From Scrap', 'wcvendors-pro' ),
    'wrapper_start' => '<div class="afs-checkbox">',
    'wrapper_end' 	=> '</div>', 
    'type' 		=> 'checkbox'
    	 ))
    );			
    				
    WCVendors_Pro_Form_Helper::input( array(  
    'type' 			=> 'text',
    'post_id'		=> $object_id, 
    'id' 			=> '_wcv_custom_product_percentage_to_vendor', 
    'label' 		=> __( 'Paid to Store Owner', 'wcvendors-pro' ), 
    'wrapper_start' 	=> '<div class="vendor-percentage show-afs">',
    'wrapper_end' 		=> '</div>', 
    'placeholder' 		=> __( '', 'wcvendors-pro' ), 
    'desc_tip' 		=> 'true', 
    'description' 		=> __( 'Percentage.', 'wcvendors-pro' ),
    'readonly' 		=> ''
    			)
    		 );
    ?> 
    

    If you need help Saving the state of your selection just ask.. thats a whole other bag of beens.

    in reply to: Cannot CHECK Product Categories #29039
    Aaron Roessler
    Participant

    ah ha… getting closer. what that theme doesn’t do is apply any CSS to the checkboxes, so they work just fine. So its NOT a buddypress issue and its actually The OneSocial themes style overlay on top of the boxes. strange that the OTHER checkboxes work just fine. hmmm… guess its time to contact BuddyBoss support.

    I also noticed the “Apply to be a vendor checkbox” looked strange and had two boxes to the left of it.. this is obviously the same issue going on! two birds in one hand! …i dont throw rocks. 😉

    Thanks for steering me in the right direction.

    added screenshot of how i used “inspect element” to also resolve what the problem was.

    in reply to: Can Customers sell products? (non vendor) #28731
    Aaron Roessler
    Participant

    Hey Ben,
    I edited a core file and it worked how i wanted it to but now I want to use functions.php instead.

    My attempts at trying to do this resulted in a swarm of 243 notification emails!! i had to quickly deactivate all plugins and erase the code i put in functions.php

    I tried using remove_action and then add_action of that whole Function function save_pending_vendor( $vendor_id )

    remove_action( 'wcv_save_pending_vendor', $vendor_id ); 
    add_action( 'wcv_save_pending_vendor', 'custom_save_pending_vendor' ); 
    function custom_save_pending_vendor( $vendor_id ) { // bad mistake.. lots of emails "Your vendor application has been pending"

    I just want to make a small change to this file /wc-vendors-pro/public/class-wcvendors-pro-vendor-controller.php

    $role   = apply_filters( 'wcvendors_pending_role', ( $manual ? 'pending_vendor' : 'vendor' ) );
    
    $wp_user_object = new WP_User( $vendor_id );
    $wp_user_object->add_role( $role); // Changed this from set_role to add_role
    in reply to: Can Customers sell products? (non vendor) #28660
    Aaron Roessler
    Participant

    ok I got the two roles to be applied when registering!! 🙂 see below for HOW i achieved multiple roles for anyone else that needs to know.

    but now a new problem that I am completely stuck on is…. I needed to copy the Vendor Application form into my own page template but I cannot get the javascript or css that styles the Select Drop Down work… and the top tabs “active li” does not have the class (class=”active”). All other styling seems to work.
    I copied code from this file “class-wcvendors-pro-public.php”
    I added a function to functions.php that would load the necessary .css sylesheets and javascripts but that did not work for the select menu or tabs.

    that worked great except for two specific things.
    1.) The top Tabs (Store, Payment, Branding etc..) the active

  • tag does not have the Class of “active”
    2.) The Drop Down Select menu’s seem to be operated by Javascript and the styling is gone?

    what other css or js files do i need to load?
    here is my page http://goodcommunities.loastage.com/vendor-application/

    ————————————————————
    HOW TO add two roles upon registration:
    wow.. much easier than i thought. Thats exactly why you said

    Please test things yourself first. Use me as a last resort

    🙂

    Here’s how it worked out:
    Used your Code here that stops WooCommerce from setting setting Role to Customer even though I chose Vendor as default role in wp-admin ->general -> settings.

    /* Forces all new registrations to your site on the My Account page to be a Vendor, rather than the Customer role */
    add_filter( 'woocommerce_new_customer_data', 'custom_woocommerce_new_customer_data' );
    function custom_woocommerce_new_customer_data( $data ){
        $data['role'] = 'vendor'; // the new default role
        return $data;
    }

    Then the plugin User Role Editor actually had a setting to apply multiple roles upon registration. thankfully i only wasted 30 min googling this when the answer was right in front of me.

    All good now.. new users are given the default roles of Vendor and Simple Vendor.

in reply to: Can Customers sell products? (non vendor) #28624
Aaron Roessler
Participant

quick question: I set ALL my Register Links on the site to point to my-account page which shows Login and Register forms. This is the WooCommerce Registration form right? I’m starting to search “How to assign multiple roles upon registration” but i’m not sure if I need to search under WordPress, WooCommerce, Buddypress or WC Vendor? how/where does the Vendor Role get applied if i set wp-admin > settings > general > change default role to Vendor.

Any pointers on which platform i should narrow my searches too?

Thanks again ben.

in reply to: Can Customers sell products? (non vendor) #28623
Aaron Roessler
Participant

YES!!! oh man thats great. and your SPEEDY response, so cool.
Thanks again Ben. Unfortunately for you, you’ll probably be hearing from me again as I continue to try and customize this site to my specific needs.
🙂

in reply to: Can Customers sell products? (non vendor) #28620
Aaron Roessler
Participant

Well i think i figured out how to achieve what I wanted to do with the Two Roles idea i mentioned above. You said it was not possible, which still maybe true.. maybe I missed something or just havn’t run into problems yet. but here’s what i did, please let me know if this will work:
1. Installed plugin “Multiple Roles” does what it says, allows User to have Multiple Roles.
2. Installed “User Role Editor”. I used this to Duplicate the “Vendor” role and called it “Simple Vendor”
3. I added both “Vendor” role and “Simple Vendor” role to my test user account. So user (Aaron) is both “Vendor” role and “Simple Vendor” which is an exact duplicate and both have same capabilities.
4. Then I need to figure out how to assign default role to “Vendor” AND “Simple Vendor” upon registration. For testing purposes I just manually assigned both roles to user Aaron as mentioned above.
5. I Edited “product-edit.php” and wrapped this code around anything that I want to hide for any user with both roles “Vendor” role and “Simple Vendor”.

<?php if ( bp_has_members( bp_ajax_querystring( 'members' ) ) ) : ?>
<?php bp_the_member(); ?>
<?php if ( !user_can( bp_get_member_user_id(), 'simple_vendor' ) ) : ?> 
// Hide anything in here if user has both roles... but show it if they only have Vendor role.
<?php endif;  ?>
<?php endif;  ?>

6. Then when they “Apply to become a Vendor” I will remove their “Simple Vendor” role.

I’m hoping your going to say “If it works, and you’re happy with it, just enjoy it!”

but i’m writing this hoping to squeeze your brain and see if you see any problems with this?

in reply to: Can Customers sell products? (non vendor) #28567
Aaron Roessler
Participant

…now you just gave me an idea. So how about this: (is it possible)
1.) Create a duplicate Vendor Role and call it Vendor Temp (or similar)
2.) Then Customize each Vendor page with some php… “if (is Vendor Temp) { ” then i can use php to remove parts of the page i dont want them to use.

I’m sure theres a lot of template files i would need to edit so that the “Vendor Temp Role” ONLY has basic capabilities to sell items.
(No Reports, No Logging, etc… just very basic usage so they can:
• Upload a product to sell. with very basic options. I would probably have to use javascript and functions to auto set most of the Add Product Settings and hide the others.
• Add Product will only have Title, Description, Short Desc. Featured Image and Gallery Images, Price. just basic stuff.
• Ability to Edit Products but only editing the basic options we allow them to edit (in bullet mentioned above)

So what do you think… does seem like a dooable approach? If yes, one last favor 😉 I would rather not use another plugin to Duplicate the Vendor Role (i.e. User Role Editor)

1) any pointers to how i can duplicate the Vendor Role and call it Vendor Temp. (then i would use your steps above to make it the default role. )
2) then.. how can i use php to check “if (is Vendor Temp)” I use this code to check if is Vendor but how to check if is Vendor Temp or another role?

<?php $vendor_id = WCV_Vendors::is_vendor( get_current_user_id()) ;
  if ( $vendor_id ) {  //do your stuff } ?>

I’m sure you heard this a lot but your absolutely amazing with your speed and support!!! I also hate waiting 5 days+ for a response from other Supports.

Thank You Thank You…

in reply to: Custom Field Checkbox not saving state #28332
Aaron Roessler
Participant

—————————————————
NOTE: I Figured it out. I had a little ah ha moment!
It was the add_filters I was using in mu functions.php that did NOT have the wrapper_start and end that was resetting it. as shown in the above code i pasted.

—————————————————
OK great. I will definitely enjoy it. One problem though… the Div Wrapper i put around the Checkbox field is not working.. but the one I added to the other TEXT box IS working.? similar code for both, only thing different is the class name.

look at both wrapper_start and wrapper_end. why would it work for the text box and not the checkbox?

This one is NOT adding the Wrapper

WCVendors_Pro_Form_Helper::input( apply_filters( 'wcv_product_enable_fp_paypal_adaptive', array( 
	 	'post_id' 		=> $object_id, 
	 	'id'	 			=> '_enable_fp_paypal_adaptive', 
	 	'label' 			=> __( 'Give Percentage to Art From Scrap', 'wcvendors-pro' ),
		'wrapper_start' 	=> '<div class="afs-checkbox">',
		'wrapper_end' 	=> '</div>', 
	 	'type' 			=> 'checkbox'
	 ))
);			

But this one works just fine??

WCVendors_Pro_Form_Helper::input( array(  
'type' 				=> 'text',
'post_id'			=> $object_id, 
'id' 				=> '_wcv_custom_product_percentage_to_vendor', 
'label' 			=> __( 'Paid to Store Owner', 'wcvendors-pro' ), 
'wrapper_start' 	=> '<div class="vendor-percentage show-afs">',
'wrapper_end' 	=> '</div>', 
'placeholder' 		=> __( '', 'wcvendors-pro' ), 
'desc_tip' 			=> 'true', 
'description' 		=> __( 'Percentage.', 'wcvendors-pro' ),
'readonly' 		=> ''
			)
		 );
in reply to: Custom Field Checkbox not saving state #28277
Aaron Roessler
Participant

whew!! holy smokes this took a long time to figure out but I think I got it. Can you please just take a look.

I just added a filter for it [ apply_filters( ‘wcv_product_enable_fp_paypal_adaptive’ ]

Is there an easier way to call the apply_filter function? or is this OK as is?

———– product-edit.php ———-

WCVendors_Pro_Form_Helper::input( apply_filters( 'wcv_product_enable_fp_paypal_adaptive', array( 
	 	'post_id' 	=> $object_id, 
	 	'id'	 	=> '_enable_fp_paypal_adaptive', 
	 	'label' 	=> __( 'Enable Split Payment Plugin Settings', 'wcvendors-pro' ),
	 	'type' 		=> 'checkbox'
	 ))
);

———– functions.php ———-

function wcv_enable_split_payment_settings ($post_id) {
     
	$enable_split_payment = get_post_meta( $post_id, '_enable_fp_paypal_adaptive', true ); 
	$wcv_percentage_to_pay = get_post_meta( $post_id, '_wcv_custom_product_percentage_to_afs', true );
	$wcv_percentage_to_vendor = get_post_meta( $post_id, '_wcv_custom_product_percentage_to_vendor', true );
$get_vendor_paypal = get_user_meta( get_current_user_id(), 'pv_paypal', true );

if ( isset($_POST['_enable_fp_paypal_adaptive']) && $_POST['_enable_fp_paypal_adaptive'] = 'yes') { 
    	echo 'This is checked.';	

	add_filter( 'wcv_product_enable_fp_paypal_adaptive', 'checkbox_is_checked' );
	function checkbox_is_checked() {
		$field['post_id'] = $post_id;
		$field['id'] = '_enable_fp_paypal_adaptive';
		$field['label'] = __( 'Enable Split Payment Plugin Settings', 'wcvendors-pro' );
		$field['type'] = 'checkbox';
		$field['value'] = 'yes'; // This checks the checkbox
		return $field;

	}

		update_post_meta( $post_id, '_enable_fp_paypal_adaptive', 'enable_indiv' );
 		update_post_meta( $post_id, '_fppap_primary_rec_mail_id', '[email protected]' );
 		update_post_meta( $post_id, '_fppap_primary_rec_percent', $wcv_percentage_to_pay );
 		update_post_meta( $post_id, '_fppap_sec_1_enable', 'yes' );
		update_post_meta( $post_id, '_fppap_sec_1_rec_mail_id', $get_vendor_paypal );
 		update_post_meta( $post_id, '_fppap_sec_1_rec_percent', $wcv_percentage_to_vendor );
    } else { 
    	echo 'This is not checked.'; 

		update_post_meta( $post_id, '_enable_fp_paypal_adaptive', 'disable' );
 		delete_post_meta( $post_id, '_fppap_primary_rec_mail_id' );
 		delete_post_meta( $post_id, '_fppap_primary_rec_percent');
 		delete_post_meta( $post_id, '_fppap_sec_1_enable' );
		delete_post_meta( $post_id, '_fppap_sec_1_rec_mail_id' );
 		delete_post_meta( $post_id, '_fppap_sec_1_rec_percent' );

    }
}
 add_action ('wcv_save_product','wcv_enable_split_payment_settings');
Aaron Roessler
Participant

THNAKS! I enabled Instant Payments. that makes sense. now i see the TWO paypal emails at checkout. Mine and Store owner.

still completely stumped on getting the third PayPal email over to Paypal at checkout???
I kept it super simple and added Two Custom Fields to Product Form:
I edited this product and added the data into the Custom Fields i created (1 and 2 below).
goodcommunities.loastage.com/shop/2nd-try/

1. Text Input – PayPal Email #2
2. Number – Enter Cost they get paid. (not ideal but…)

I just want to figure out HOW to get 1. and 2. to be sent over to paypal at checkout. Just cant wrap my head around that.

WCVendors_Pro_Form_Helper::input( array(  
			'post_id'			=> $object_id, 
			'id' 				=> '_wcv_custom_product_paidtoartfromscrap', 
			'label' 			=> __( 'Email PayPal Email #2', 'wcvendors-pro' ), 
			'placeholder' 		=> __( 'Enter Paypal Email', 'wcvendors-pro' ), 
			'type' 				=> 'text', 
			)
		 );
WCVendors_Pro_Form_Helper::input( array(  
			'post_id'			=> $object_id, 
			'id' 				=> '_wcv_custom_product_paidtoartfromscrapnumber', 
			'label' 			=> __( 'Enter Cost they get paid', 'wcvendors-pro' ), 
			'placeholder' 		=> __( '', 'wcvendors-pro' ), 
			'type' 				=> 'number', 
			)
		 );
		
// To use this in your woocommerce product template page where you want it displayed use the following
$paidtoartfromscrap = get_post_meta ($product_id, '_wcv_custom_product_paidtoartfromscrap', true ); 
$paidtoartfromscrapnumber = get_post_meta ($product_id, '_wcv_custom_product_paidtoartfromscrapnumber', true ); 
Aaron Roessler
Participant

too much Yerba Mate!! keep sending too soon.

Aaron Roessler
Participant

Figuring out your custom code is up to you. 🙂 We don’t know how that weird plugin you are integrating with works. That’s your job to figure it out.

totally get that too. FYI – not going to use that other plugin anymore. Just WC Vendor Pro. Also, YES I will figure out my own code… just confused to how/where that data gets stored then how it gets sent to PayPal Checkout Screen to get split to 3 or 4 emails. Similar question is: How can i get the paypal checkout page “Your Payment Summary” List who’s getting paid? MAYBE it WILL once i get this working?

I just activated the Split Payment Plugin and did a test transaction just so you can see the window i am talking about.

Aaron Roessler
Participant

Here’s how i THOUGHT it would go down.
Product is $10
10% commish to ME ($1)
then left over $9 gets split 15% to Art From Scrap.. and 85% to Store Owner
Donate is completely separate SET cost. $5 on its own.. not from product. so the Cart would be $15 but the $5 donate will not get Commission.

FOR NOW lets completely forget the DONATE thing.

(6 total) so if someone buys 2 or 3 products on your site you’re screwed.

totally get that part. Worry bout that issue later.

Aaron Roessler
Participant

Last post for now… then I sit patiently and wait. 🙂

I have setup Sandbox Credentials and all is working fine, except the Split Payment thing. I got it to work using that OTHER plugin (WooCommerce PayPal Adaptive Split Payment) but thats only because it had front end settings i could plug the data into. Here’s a screenshot of the Product Settings when i activate the plugin. Then i used WPUF to build a form and set Values for those settings.

…but now that i don’t need/want either plugin WPUF and Split Payments… I want to get this BEAUTIFUL WC Vendor Pro working.

Thanks Ben. There’s a glimpse of light… and a tunnel. and i got my running shoes on!

Aaron Roessler
Participant

I just dont get how once you get to the last paypal screen to PAY.. how does paypal get all the Emails form the product and send appropriate payment to each person?

Except for the DONATE Option i spoke about. here’s all 3 Custom Fields
1. YES checkbox – still need to setup a hidden Custom Field that will SET the PayPal Email for Art From Scrap.
2. Select Menu
3. Remaining Percentage

 WCVendors_Pro_Form_Helper::input( 
  array( 
  'post_id' 	=> $object_id, 
  'id'	 	=> 'wcv_custom_product_pay_percentage_enable', 
  'label' 	=> __( 'Percentage of price paid to (company name goes here)?', 'wcvendors-pro' ),
  'type' 	=> 'checkbox' 
)
);	
WCVendors_Pro_Form_Helper::select( array( 
 'type'      => 'number',
 'post_id'   => $object_id, 
 'id'     => 'wcv_custom_product_percentage', 
 'label'    => __( 'Select Percentage', 'wcvendors-pro' ), 
 'placeholder'   => __( '0', 'wcvendors-pro' ), 
 'desc_tip'    => 'true', 
 'description'   => __( 'Give a percentage of this product to Art from Scrap.', 'wcvendors-pro' ), 
  'options' 		  	=> array(
							''     	=> __( '- Select Percentage -', 'wcvendors-pro' ),
							'5'     	=> __( '5%', 'wcvendors-pro' ),
							'10' 			=> __( '10%', 'wcvendors-pro' ),
							'15'    		=> __( '15%', 'wcvendors-pro' ),
							'20'     		=> __( '20%', 'wcvendors-pro' ),
							'25' 			=> __( '25%', 'wcvendors-pro' ),
							'30'    		=> __( '30%', 'wcvendors-pro' ),
							'35' 			=> __( '35%', 'wcvendors-pro' ),
							'40'    		=> __( '40%', 'wcvendors-pro' ),
							'45'     		=> __( '45%', 'wcvendors-pro' ),
							'50' 			=> __( '55%', 'wcvendors-pro' ),
							'65'    		=> __( '65%', 'wcvendors-pro' ),
							'70' 			=> __( '70%', 'wcvendors-pro' ),
							'75'    		=> __( '75%', 'wcvendors-pro' ),
							'80'     		=> __( '80%', 'wcvendors-pro' ),
							'85' 			=> __( '85%', 'wcvendors-pro' ),
							'90'    		=> __( '90%', 'wcvendors-pro' ),
							'95' 			=> __( '95%', 'wcvendors-pro' )
      ),  
    )
  );
				
WCVendors_Pro_Form_Helper::input( array(  
			'post_id'			=> $object_id, 
			'id' 				=> 'wcv_custom_product_customer_percentage', 
			'label' 			=> __( 'Percentage you pay', 'wcvendors-pro' ), 
			'placeholder' 		=> __( '', 'wcvendors-pro' ), 
			'desc_tip' 			=> 'true', 
			'description' 		=> __( 'This percentage is what you will pay.', 'wcvendors-pro' ), 
			'type' 				=> 'number', 
			)
		 );

FUNCTIONS.PHP

function wcv_enable_gift_wrap ($post_id) {
	 $wcv_pay_percentage = get_post_meta( $post_id, 'wcv_custom_product_pay_percentage_enable', true );
	 $wcv_percentage_amount = get_post_meta( $post_id, 'wcv_custom_product_percentage', true );
	 $wcv_percentage_customer = get_post_meta( $post_id, 'wcv_custom_product_customer_percentage', true );
	 if ( $wcv_pay_percentage = 'yes' ) {
		update_post_meta( $post_id, '_yes_pay_percentage', $wcv_pay_percentage );
		update_post_meta( $post_id, '_percentage_amount', $wcv_percentage_amount );
		update_post_meta( $post_id, '_percentage_customer', $wcv_percentage_customer );
		
	
	 }	 
 }
 add_action ('wcv_save_product','wcv_enable_percentage');
Aaron Roessler
Participant

gosh darnit!! learning not to swear around my daughter 😉 disregard this line “When Vendor adds product.
Then 30% to Vendor Store owner (paypal email #2). then the remaining 60%”

Viewing 50 posts - 1 through 50 (of 52 total)