Forum Replies Created

Viewing 15 replies - 16 through 30 (of 36 total)
  • Please help me for this question.

    Thank you.

    Thread Starter skylarkcob

    (@skylarkcob)

    Sorry, it’s just my fault. I make it working now.

    Thread Starter skylarkcob

    (@skylarkcob)

    Thank you very much indeed Claudio Sanches.

    Thread Starter skylarkcob

    (@skylarkcob)

    It’s my theme, I try to change to Twenty Fifteen theme and no problem occurred ??

    ===

    I finally figured out the cause of this error, it’s my script. Sorry about that.

    Thread Starter skylarkcob

    (@skylarkcob)

    Thank you very much for you great jobs, thank you Woo Team and WordPress Team too.

    I move $order->calculate_totals(); after $order->update_status(‘processing’); and it works now.

    I’m still having problem with product attributes ajax saving now. I try to change theme to Twenty Fifteen and it works ??

    Thread Starter skylarkcob

    (@skylarkcob)

    Thank you very much Claudio Sanches but email not sent.

    $name = hocwp_get_value_by_key($data, 'name');
    $phone = hocwp_get_value_by_key($data, 'phone');
    $email = hocwp_get_value_by_key($data, 'email');
    $address = hocwp_get_value_by_key($data, 'address');
    $message = hocwp_get_value_by_key($data, 'message');
    $name = hocwp_sanitize_first_and_last_name($name);
    $addresses = array(
    	'first_name' => $name['first_name'],
    	'last_name' => $name['last_name'],
    	'email' => $email,
    	'phone' => $phone,
    	'address_1' => $address
    );
    $args = array(
    	'customer_note' => $message,
    	'created_via' => 'programmatically'
    );
    if(is_user_logged_in()) {
    	$current = wp_get_current_user();
    	$args['customer_id'] = $current->ID;
    }
    $order = wc_create_order($args);
    $gateway = WC_Payment_Gateways::instance();
    $gateways = $gateway->get_available_payment_gateways();
    if(hocwp_array_has_value($gateways)) {
    	$gateway = current($gateways);
    	$order->set_payment_method($gateway);
    }
    $order->set_address($addresses);
    $order->set_address($addresses, 'shipping');
    $product = wc_get_product($post_id);
    $order->add_product($product);
    $order->calculate_totals();
    $order->record_product_sales();
    $order->update_status('processing');
    $order->payment_complete();
    Thread Starter skylarkcob

    (@skylarkcob)

    Thank you very much Claudio Sanches, but email not sent.

    ### WordPress Environment ###
    
    Home URL: https://192.168.1.66/remoingay
    Site URL: https://192.168.1.66/remoingay
    WC Version: 2.5.5
    Log Directory Writable: ?
    WP Version: 4.4.2
    WP Multisite: –
    WP Memory Limit: 256 MB
    WP Debug Mode: ?
    Language: en_US
    
    ### Server Environment ###
    
    Server Info: Apache/2.4.9 (Win32) OpenSSL/1.0.1g PHP/5.5.11
    PHP Version: 5.5.11
    PHP Post Max Size: 750 MB
    PHP Time Limit: 5000
    PHP Max Input Vars: 1000
    SUHOSIN Installed: –
    MySQL Version: 5.6.16
    Max Upload Size: 750 MB
    Default Timezone is UTC: ?
    fsockopen/cURL: ?
    SoapClient: ?
    DOMDocument: ?
    GZip: ?
    Multibyte String: ?
    Remote Post: ?
    Remote Get: ?
    
    ### Database ###
    
    WC Database Version: 2.5.5
    :
    woocommerce_sessions: ?
    woocommerce_api_keys: ?
    woocommerce_attribute_taxonomies: ?
    woocommerce_termmeta: ?
    woocommerce_downloadable_product_permissions: ?
    woocommerce_order_items: ?
    woocommerce_order_itemmeta: ?
    woocommerce_tax_rates: ?
    woocommerce_tax_rate_locations: ?
    
    ### Active Plugins (2) ###
    
    Meta Slider: by Matcha Labs – 3.3.6
    WooCommerce: by WooThemes – 2.5.5
    
    ### Settings ###
    
    Force SSL: –
    Currency: VND (?)
    Currency Position: right
    Thousand Separator: ,
    Decimal Separator: .
    Number of Decimals: 0
    
    ### API ###
    
    API Enabled: ?
    API Version: 3.1.0
    
    ### WC Pages ###
    
    Shop Base: #5 - /shop
    Cart: #6 - /cart
    Checkout: #7 - /checkout
    My Account: #8 - /tai-khoan
    
    ### Taxonomies ###
    
    Product Types: external (external)
    grouped (grouped)
    simple (simple)
    variable (variable)
    
    ### Theme ###
    
    Name: Remon
    Version: 1.0.0
    Author URL: https://www.hocwp.net
    Child Theme: ? – If you're modifying WooCommerce on a parent theme you didn't build personally
    then we recommend using a child theme. See: How to create a child theme
    
    WooCommerce Support: ?
    
    ### Templates ###
    
    Overrides: hocwp-remon/archive-product.php version - is out of date. The core version is 2.0.0
    hocwp-remon/single-product.php version - is out of date. The core version is 1.6.4
    hocwp-remon/taxonomy-product_cat.php version - is out of date. The core version is 1.6.4
    
    : Learn how to update outdated templates

    Here is my code:

    $name = hocwp_get_value_by_key($data, 'name');
    $phone = hocwp_get_value_by_key($data, 'phone');
    $email = hocwp_get_value_by_key($data, 'email');
    $address = hocwp_get_value_by_key($data, 'address');
    $message = hocwp_get_value_by_key($data, 'message');
    $name = hocwp_sanitize_first_and_last_name($name);
    $addresses = array(
    	'first_name' => $name['first_name'],
    	'last_name' => $name['last_name'],
    	'email' => $email,
    	'phone' => $phone,
    	'address_1' => $address
    );
    $args = array(
    	'customer_note' => $message,
    	'created_via' => 'programmatically'
    );
    if(is_user_logged_in()) {
    	$current = wp_get_current_user();
    	$args['customer_id'] = $current->ID;
    }
    $order = wc_create_order($args);
    $gateway = WC_Payment_Gateways::instance();
    $gateways = $gateway->get_available_payment_gateways();
    if(hocwp_array_has_value($gateways)) {
    	$gateway = current($gateways);
    	$order->set_payment_method($gateway);
    }
    $order->set_address($addresses);
    $order->set_address($addresses, 'shipping');
    $product = wc_get_product($post_id);
    $order->add_product($product);
    $order->calculate_totals();
    $order->record_product_sales();
    $order->update_status('processing');
    $order->payment_complete();

    Please deactivate all plugins exclude WooCommerce for testing. I’m using version 2.5.4 and it works normally.

    Please help, Google+ not loading.

    Hi Yoast,

    Thank you for your great plugin. But now I’m using WordPress 4.4 and install plugins: Yoast SEO + qTranslate-X, the category description not working completely. The description field is converted into tinyMCE mode, so please check it.

    Thank you.

    Thread Starter skylarkcob

    (@skylarkcob)

    Thank you for your fast reply George Notaras, I’ll try with your guide.

    You can see my demo post at link: https://demo.hocwp.net/horriblesubs/shows/gintama/

    Plugin Author skylarkcob

    (@skylarkcob)

    All plugins and themes are created by SB Team only run with plugin SB Core activated.

    https://www.ads-software.com/plugins/sb-core

    Plugin Author skylarkcob

    (@skylarkcob)

    Thanks for your reply Vadim V. I’ll add it on the next update.

    Plugin Author skylarkcob

    (@skylarkcob)

    Thanks for your post robertamundson. I’ll update it on the next update.

    Thread Starter skylarkcob

    (@skylarkcob)

    I find the cause after several hours. I turn off function allows displaying custom post type and custom taxonomy page nav-menus.php.


    $args = array('show_in_nav_menus' => false);

    My problem has been resolved.

    Thanks Tara for your reply. But I don’t know why the page get 404 error when using many custom post types and custom taxonomies. Even when I use a lot of (about 30) categories it was so.

Viewing 15 replies - 16 through 30 (of 36 total)