w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Wordpress update user meta through woocommerce checkout process
The code you have isnt getting the user id. First you need to query the current user like what you have: $current_user = wp_get_current_user(); But the bit you are missing is: echo $current_user->ID; So your code adpated will look like this: $current_user = wp_get_current_user(); $pointsafterorder = $current_user->points - $woocommerce->cart->total; update_user_meta( $current_user->ID, $current_user->points, $pointsafterorder );

Categories : Wordpress

Update user meta after woocommerce checkout form process
class-wc-checkout.php line 639 creates the new user with $this->customer_id = wp_insert_user( apply_filters( 'woocommerce_new_customer_data', $new_customer_data ) ); The new customer data is an array listed just above that line. Following that, you can access the user id with line 649's action do_action( 'woocommerce_created_customer', $this->customer_id ); It is unlikey, in your case, you will need to use the filter, but simply add the action 'woocommerce_created_customer', pull in the id, and add the meta.

Categories : Wordpress

Woocommerce show shipping methods in checkout page?
In your wordpress Backend Go to WooCommerce -> Settings -> Shipping You will see list of all shipping methods like this Activte and configured all shipping methods, And for for some shipping methods, Your product must have dimensions like "Weight,Length,Width,Height" In order to calculate shipping charge. Hope, It will help you!

Categories : PHP

wordpress woocommerce show breadcrumbs in checkout page?
May be helpfull for you There are two files you need to change your breadcrumb's in WooCommerce. You'll find those files in your WooCommerce plugin directory First Template file: if ( ! function_exists( 'woocommerce_breadcrumb' ) ) { /** * Output the WooCommerce Breadcrumb * * @access public * @return void */ function woocommerce_breadcrumb( $args = array() ) { $defaults = array( 'delimiter' => ' &rsaquo; ', 'wrap_before' => '<div id="breadcrumb" itemprop="breadcrumb">', 'wrap_after' => '</div>', 'before' => '', 'after' => '', 'home' => null ); $args = wp_parse_args( $args, $defaults ); woocommerce_get_template( 'shop/breadcrumb.php', $args ); } } The second file: /woocommerce/templates/shop/breadcrumb.php,

Categories : Wordpress

magento One Page Checkout is totally blank
You were missing 1columns-right.phtml, this is not a standard in template in base so you were missing the template in your theme folder, I hope so at least as modifying core files is asking for trouble. app/design/frontend/{theme folder}/default/template/page/1columns-right.phtml For a temporary fix you could copy 1column.phtml to 1columns-right.phtml as one page checkout should work with the default files.

Categories : Magento

woocommerce Customising checkout fields
try adding - woocommerce language support, which is for translators - check the add_action function in which you are adding it too - spacing can be a problem in the wrong places also to add language support, try so $fields['billing']['billing_state'] = array( 'label' => __('State:', 'woocommerce'), 'required' => true, 'class' => array('form-row-wide'), 'label_class' => array('infocounty'), 'clear' => true, 'placeholder' => _x('', 'placeholder', 'woocommerce') ); where i added "woocommerce" next to placeholder. :)

Categories : Wordpress

wordpress- woocommerce add an optional product at checkout
I've been looking for this too. An optional addons to the main product, all that I've found is official woocommerce plugin (Woocommerce Product Addons) http://www.woothemes.com/products/product-add-ons/

Categories : Wordpress

custom woocommerce checkout form fields
Have you tried: woocommerce_form_field( 'email_signup', array( 'type' => 'checkbox', 'class' => array('input-checkbox'), 'label' => __('Newsletter Signup?'), 'checked' => 'checked', ), $checkout->get_value( 'email_signup' ));

Categories : PHP

Send woocommerce checkout data to another table in wordpress
you will need to add an action to woocommerce_checkout_process. an example would be: add_action('woocommerce_checkout_process', 'send_data_to_another_table'); function send_data_to_another_table() { //Your Code Here } Within the function you will need to insert the data in to your wordpress table.

Categories : PHP

php script giving timeout or blank page after server update
Try putting: set_time_limit(300); At the top of your page, before the rest of your PHP code. See if your script will execute properly then - you should aim to reduce the amount of time the script takes to execute though, even if that does solve it. Edit: I have a feeling that won't work, as it might not be PHP that's having a problem with timing out. If that doesn't help, then it's probably something to do with how your server is set up and you'll need to fix that, or get someone else to do so.

Categories : PHP

Instant Payment Notification order description blank in Express Checkout
PayPal doesn't recognize your line item details (L_PAYMENTREQUEST_0_NAME0 or L_PAYMENTREQUEST_0_DESC0) because you didn't include the line item quantity or price, and you didn't include the item subtotal. Ideally, you should be passing full details on the items that you sold, but if you just want to pass a summary, you need to add the following parameters to your DoExpressCheckoutPayment call: L_PAYMENTREQUEST_0_AMT0 (set this to the order total) L_PAYMENTREQUEST_0_QTY0 (set this to 1) PAYMENTREQUEST_0_ITEMAMT (set this to the order total)

Categories : PHP

Timeout waiting for Processor response on PayPal Hosted Checkout Page goest always on error page url
The 41111... card is not supported at this time. Please use any other Luhn-valid card number. I.e. http://www.darkcoding.net/credit-card-numbers/

Categories : Paypal

PayPal embedded checkout page returns to incorrect page
You should be able to set it in the account. What URL is it taking you back to? Can you capture what you are sending over to the hosted page and see if you are passing anything over in there that would be causing the issue. Can you provide a link to your check out so that we can test it? I can also take a look at the account settings on my side to make sure they are correct, but setting it in the account should work.

Categories : Paypal

SVN checkout interrupt and then update
Sure, just clean locks and update your repo: Example: svn co http://some-repo/path/to/trunk # Ctrl+C pressed # cleaning locks up svn cleanup # now downloading rest of working copy svn up

Categories : Svn

woocommerce hook on page-new.php
You can fire your hook selectively using: add_action( 'load-post-new.php', 'your_callback' ); And then check for the post type before adding the hook: function your_callback() { global $typenow; if( 'product' != $typenow ) return; add_action( 'edit_form_after_title', 'myprefix_edit_form_after_title' ); } Or, another option: add_action( 'edit_form_after_title', 'myprefix_edit_form_after_title' ); function myprefix_edit_form_after_title() { global $pagenow, $typenow; if( 'post-new.php' != $pagenow || 'product' != $typenow ) return; echo 'This is my text!'; }

Categories : Forms

Automatically update a maven project under eclipse, after a svn-checkout
If you have Subversive (installable via the Marketplace), you can checkout and set up the project in one step from Eclipse. In the dialog File -> Import try the entry Maven -> Check out Maven Projects from SVN. Unfortunately, maven project configurations tend to get stale when you're changing stuff in the POM. Another tip from me is use the keyboard shortcut for "Update Project" (Alt-F5 on Mac & Windows) which should select the project you're currently in and has the option to update all projects at once.

Categories : Eclipse

How to make "document.write" in an if statement work on the same html page rather than a new blank page?
This has nothing to do with being in an if statement, it has to do with using document.write when the document is in a closed state. Using it then will open a new document to write to. There is no way around that. Use DOM manipulation instead of document.write.

Categories : Javascript

Svn checkout/update/cleanup fails. Looking for a temp file to copy
This answer was suggested here: Can't open .svn/text-base/file.svn-base? It happened to me in a subfolder within a much more massive folder. Instead of wiping out my entire project, I was able to "fix" it by deleting the subfolder from the commandline, and then doing a svn update, which restored the missing subfolder.

Categories : Svn

Subversion checkout error: Missing update-report close tag
I ran to into this on version 1.8.1. I had ignored a subdirectory when it was out of sync and this directory was giving me issues. When I readded everything in the problem directory and commited, I was then able to reignore the directory and update the parent. Hope this helps.

Categories : Svn

Woocommerce category page missing paging
The problem was caused because the post_per_page query argument wasn't set on the archive page. This can be solved by overriding and adding following code to your woocommerce archive (archive-product.php) page. //Will only effect the woocommerce archive page global $query_string; query_posts($query_string . "&posts_per_page=12"); Or by adding following to the functions.php of your theme //Will effect both the woocommerce archive page and the wordpress archive page function set_row_count_archive($query){ if ($query->is_archive) { $query->set('posts_per_page', 15); } return $query; } add_filter('pre_get_posts', 'set_row_count_archive'); Hope this helps someone.

Categories : Wordpress

Woocommerce - How to put a product on a Wordpress portfolio page?
The easiest way might be to use a shortcode from WooCommerce: http://docs.woothemes.com/document/woocommerce-shortcodes/ Not sure if this will solve your problem exactly as desired, but it might get you close.

Categories : Wordpress

Customize Woocommerce Customer Account Page
If you copy the template files from the plugin directory to your theme (or child theme) directory, you can edit them to get what you want. The files in your theme directory will override the stock plugin template. So the original templates are in plugins/woocommerce/templates/myaccount Move the files you want to alter (probably just my-address.php, and/or my-account.php) to themes/my-theme/woocommerce/templates/myaccount/. (NB: that's what the docs say, although I've found that the directory ought to be themes/my-theme/woocommerce/myaccount/—although that could be from conflicting plugins I also have installed.) When you're editing the PHP file, the fields you're after are: $firstname = get_user_meta( $customer_id, 'billing_first_name', true ); $lastname = get_user_meta( $customer_i

Categories : Wordpress

Magento empty page in checkout/cart
If header/footer exists it means that script worked from start till end, but might be with some errors. Generally you should first of all try to look for all remove directives in your layout xml files(grep helps). It might be that the content area is simply removed by some xml. In case XML way thing didn't worked, the things are getting tougher. You should check every template file which should be rendered in the content. it might be that content is somehow commented out. The other thing to consider is, as far as I remember, the content block should have type list or output="toHtml" so it would be rendered automatically. At the moment that's all what I might think off. Oh ya! And check that checkout module is enabled and it's output also enabled! To check if module enabled you should

Categories : Magento

TRUE single checkout page on BigCommerce
I could get the top three accordions open at the same time (the bottom ones are shipping methods and order confirmations, which I think are tied to the previous steps) $('.ExpressCheckoutBlockCollapsed').addClass('ExpressCheckoutBlockCompleted') $('.ExpressCheckoutBlockCollapsed').removeClass('ExpressCheckoutBlockCollapsed') I think if you have this code trigger on the checkout page, it might help a little. Regarding changing the order of elements, chrome console shows the following IDs associated with these elements, can't you anchor them to different locations, as you need it? $('.ExpressCheckoutBlockCollapsed').addClass('ExpressCheckoutBlockCompleted') [ <div class=​"Clear ExpressCheckoutBlock ExpressCheckoutBlockCompleted" id=​"CheckoutStepBillingAddress" style=​"cursor:

Categories : Javascript

Opencart show sidebar in checkout page
Login to your admin area then navigate to: Extensions > Modules Then click on the Edit link (under the actions column) next to Category module name. Click the Add Module button and select Checkout as your layout and Content Left as the position. Make sure that you've enabled it and click Save. Refresh your page and you should then see the category list on your checkout page. Hope that helps!!

Categories : PHP

Magento setAttribute error on checkout page
@ROMMEL has helped with the answer. These are the steps I took to solve the issue: Put this in a jquery-noconflict.js file : jQuery.noConflict(); Add it in right after your jQuery.js file in the DONE! =) Makes a lot of errors that people said bootstrap and prototype interfering with each other. All those errors disappear after issuing the noConflict()!

Categories : Javascript

Google Checkout - Internal server error while requesting a notification history update
Can't answer for Google but it seems Google Checkout sandbox seems to have been shutdown / deprecated (already). This is my guess/perception as I cannot login to my Google Checkout sandbox which was at https://sandbox.gogle.com/checkout/sell for sandbox related activity like integration settings, debug console, etc. I do see that the former sandbox Merchant center is accessible at: https://wallet-web.sandbox.google.com/manage So you can check sandbox orders (across different APIs) but as stated, it doesn't have the knobs/switches relevant to Google Checkout (other APIs have different "consoles" for API settings). I don't know why (if it's early deprecation)...perhaps it's late in the game as it pertains to Google Checkout retirement to start debugging now.... See Google Checkout depreca

Categories : Misc

Magento add custom amount in checkout cart page
The logic whether to apply or not to apply the fee is located in Excellence_Fee_Model_Fee::canApply(). This is a static function that returns true by default. Add your custom logic there... when it returns true it will add the fee.

Categories : Magento

how to proceed to checkout page after making order in bigcommerce?
If you are capturing an order via the API, you won't be able to direct the user to a checkout page to just capture payments. The order creation is more for POS kind of flow, where you can capture the payment externally and create an order associated with that product in your bigcommerce store, thereby managing inventory details, syncing orders, etc.

Categories : Api

attribute value added cart checkout and order page
I think you should use the Custom Options feature for this instead of using an attribute. Here is a nice screencast about custom options. You just have to create a custom option with type checkbox and use as values you colors. The downside of this is that if you want the options for more products, you will have to manually add the option for all. Or you can search for an extension that allows one custom option for multiple products. After adding the options, you don't have to do anything. They will be added as options to the cart.

Categories : Magento

magento how to change cart account in checkout page
You need use "sales_quote_add_item" magento event to update the product price in cart session. You have to make a custom module for that purpose. Create a file in app/etc/modules/Company_All.xml <?xml version="1.0"?> <config> <modules> <Company_Product> <codePool>local</codePool> <active>true</active> </Company_Product> </modules> </config> Create configuration file for our module file in app/code/local/Company/Product/etc/config.xml <?xml version="1.0"?> <config> <global> <models> <product> <class>Company_Product_Model</class> </product> </models> <events> <sales_quote_add_item><

Categories : Misc

Joomla 1.5 font page blank page
I have found the problem. On if its modules was causing the blank page error in some way. I was able to find this out by first making a copy of the current site using Akeeba Backup plugin. Installed is on my localhost. Installed a fresh version of Joomla 1.5 (with out default data) Then edited the configuration.php file's database connection settings /* Database Settings */ var $dbtype = 'mysql'; var $host = 'localhost'; var $user = 'root'; var $password = 'password'; var $db = 'dbname'; var $dbprefix = 'jos_'; to use the database created from the copied version of the website I installed on my localhost. With that being done the fresh version of joomla I created had all the database information I needed to recreate a new website with the same content. I then started copying the compo

Categories : Joomla

Woocommerce hide featured image on product detail page
You can do a simple hack with javascript: $('.images').remove(); Or in your theme, add this to your functions.php remove_action( 'woocommerce_before_single_product_summary', 'woocommerce_show_product_images', 20 ); You will most likely need to fix the CSS so it doesn't look weird without the image.

Categories : Image

git checkout master error: the following untracked working tree files would be overwritten by checkout
do a : git branch if git show you something like : * (no branch) master Dbranch You have a "detached HEAD". If you have modify some files on this branch you, commit them, then return to master with git checkout master Now you should be able to delete the Dbranch.

Categories : GIT

How to display only order total in paypal checkout page as like ebay do
I dont't know how they do that but i know that, Owner of paypal is eBay Inc. You can display your company logo by just putting one more hidden field value="http://fedoraproject.org/w/uploads/e/e2/Fedora-infinity-logo-64-64.png">

Categories : Paypal

Paypal Hosted Checkout Page (Layout C) Language other than English
It depends on the country of the account signed up for Hosted Sole Solution; French and British accounts can use LC=FR, others cannot. **Account country available 'lc' parameters** United Kingdom GB, FR France FR, US Italy IT, US Spain ES, US Hong Kong GK, HK Australia AU Japan JP, US If you're using PayPal Payments Advanced ('Payflow Link' with Hosted Checkout Pages); this doesn't support any other languages at this time unfortunately.

Categories : Paypal

wordpress woocommerce: how to display product custom attribute on category page
You can use while loop like this if (have_posts()) { while (have_posts()) { the_post(); $key_1_values = get_post_meta( $post->ID, 'Qun' ); // check if the custom field has a value if( ! empty( $key_1_value ) ) { echo $key_1_value; } } }

Categories : Wordpress

KALLYAS theme with WooCommerce plugin - Cannot remove sidebar on "Shop" page
make sure the page layout is set to "No sidebar", along with the "Defualt - Set from theme options" sidebar selected just like in the picture below. Also did you try to empty cache and hard reload? HAHA

Categories : CSS

Why not always use _express-checkout-mobile for Paypal Express Checkout?
I've always used _express-checkout and it automatically detects which experience to use. I think if you use _express-checkout-mobile it will use the mobile experience regardless of the platform the user is on, but I haven't tested that specifically.

Categories : Paypal

PHP: Update everything but blank fields
You have to check each item to see if it's empty, and then build your query: $qString = ''; if(!empty($title)) $qString .= "`title` = '$title',"; if(!empty($about)) $qString .= "`about` = '$about',"; if(!empty($gender)) $qString .= "`gender` = '$gender',"; if(!empty($check)) $qString .= "`check` = '$check',"; if(!empty($facebook)) $qString .= "`facebook` = '$facebook',"; if(!empty($twitter)) $qString .= "`twitter` = '$twitter',"; if(!empty($youtube)) $qString .= "`youtube` = '$youtube',"; $qString = trim($qString,','); if(!empty($qString)){ $sql4 = "UPDATE `user_profiles` SET $qString WHERE `id` = '$id'"; } I'd really recommend using PDO or mysqli and use parameters to prevent sql injection

Categories : PHP



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.