WPForms Lite free WordPress plugin supports PayPal, Stripe, and Constant Contact.
WordPress Free Plugin That Supports PayPal, Stripe, Constant Contact
Posted by Hari onSunday, 6 April 2025
at
02:11
0
comments
Labels:
WordPress
Share on Twitter, Facebook, Delicious, Digg, Reddit Email This BlogThis! Share to X Share to Facebook
Share on Twitter, Facebook, Delicious, Digg, Reddit Email This BlogThis! Share to X Share to Facebook
How to add custom discounts to the WooCommerce checkout page WordPress
Posted by Hari onSaturday, 5 April 2025
Original article is found here
/**
* @snippet Dynamic Fee @ WooCommerce Checkout
* @how-to businessbloomer.com/woocommerce-customization
* @author Rodolfo Melogli, Business Bloomer
* @testedwith WooCommerce 3.9
* @community https://businessbloomer.com/club/
*
*/
// Part 1
// Display Radio Buttons
add_action( 'woocommerce_review_order_before_payment', 'bbloomer_checkout_radio_choice' );
function bbloomer_checkout_radio_choice() {
$chosen = WC()->session->get( 'radio_chosen' );
$chosen = empty( $chosen ) ? WC()->checkout->get_value( 'radio_choice' ) : $chosen;
$chosen = empty( $chosen ) ? '0' : $chosen;
$args = array(
'type' => 'radio',
'class' => array( 'form-row-wide', 'update_totals_on_change' ),
'options' => array(
'0' => 'Pay Special Offer Amount ₹3000/-',
'-1000' => 'Pre-booking Request for ₹2000/-',
'-2000' => 'Pre-booking Request for ₹1000/-',
),
'default' => $chosen
);
echo '<div id="checkout-radio">';
echo '<h3 style="margin-bottom:15px;">Customize Your Order!</h3>';
woocommerce_form_field( 'radio_choice', $args, $chosen );
echo '</div>';
}
// Part 2
// Add Fee and Calculate Total
add_action( 'woocommerce_cart_calculate_fees', 'bbloomer_checkout_radio_choice_fee', 20, 1 );
function bbloomer_checkout_radio_choice_fee( $cart ) {
if ( is_admin() && ! defined( 'DOING_AJAX' ) ) return;
$radio = WC()->session->get( 'radio_chosen' );
if ( $radio ) {
$cart->add_fee( 'Discounted Price', $radio );
}
}
// Part 3
// Add Radio Choice to Session
add_action( 'woocommerce_checkout_update_order_review', 'bbloomer_checkout_radio_choice_set_session' );
function bbloomer_checkout_radio_choice_set_session( $posted_data ) {
parse_str( $posted_data, $output );
if ( isset( $output['radio_choice'] ) ){
WC()->session->set( 'radio_chosen', $output['radio_choice'] );
}
}
at
03:05
0
comments
Labels:
WordPress
Share on Twitter, Facebook, Delicious, Digg, Reddit Email This BlogThis! Share to X Share to Facebook
Share on Twitter, Facebook, Delicious, Digg, Reddit Email This BlogThis! Share to X Share to Facebook
Get a maximum of 750 or 7% off whichever is lower on any purchase on Ebay India
Posted by Hari onTuesday, 11 August 2015
I bought Internet pack on Vodafone website they gave me this gift voucher of eBay India after completing the transaction with that website. I don't want this voucher, so you can use it if you like. I am providing the details below.
eBay India Gift Voucher Code is : NA4GCUDBYU
Gift Voucher Validity : Jan 1, 2015 - Sep 30, 2015
Visit www.ebay.in to redeem this eCoupon.
at
09:20
0
comments
Share on Twitter, Facebook, Delicious, Digg, Reddit Email This BlogThis! Share to X Share to Facebook
Share on Twitter, Facebook, Delicious, Digg, Reddit Email This BlogThis! Share to X Share to Facebook
Enemy Front Crashed on Start Fix Win 8.1
Posted by Hari onMonday, 10 August 2015
My laptop is running on Windows 8.1, when I first installed the Enemy Front game it crashed on start up. Error is like “Enemy Front not working properly on Windows”. But it worked fine when I uninstalled the Enemy Front and installed it back. Hope this works for those who are facing similar issues.
at
00:09
0
comments
Labels:
Game
Share on Twitter, Facebook, Delicious, Digg, Reddit Email This BlogThis! Share to X Share to Facebook
Share on Twitter, Facebook, Delicious, Digg, Reddit Email This BlogThis! Share to X Share to Facebook
How to store custom field value in variable [WordPress]
Posted by Hari onFriday, 4 July 2014
In WordPress blog we use custom fields for retrieving values from posts and pages. Here we will see how to store custom values in variables.
We have custom field for example:
Custom Field Name:SingleProduct
Custom Field Value:12345
Now we will see how we can store values using get_post_custom_values(“Custom Field Name”) function.
Here $values is array. get_post_custom_values function stores custom field values in array.
And then the $values[0] is stored in $SingleProduct variable.
We have custom field for example:
Custom Field Name:SingleProduct
Custom Field Value:12345
Now we will see how we can store values using get_post_custom_values(“Custom Field Name”) function.
<?php
$values = get_post_custom_values("SingleProduct");
if (isset($values[0])) {
$SingleProduct = $values[0];
} ?>
Here $values is array. get_post_custom_values function stores custom field values in array.
And then the $values[0] is stored in $SingleProduct variable.
at
09:29
0
comments
Labels:
PHP,
WordPress
Share on Twitter, Facebook, Delicious, Digg, Reddit Email This BlogThis! Share to X Share to Facebook
Share on Twitter, Facebook, Delicious, Digg, Reddit Email This BlogThis! Share to X Share to Facebook
How to add custom jQuery captcha to MailPoet Newletters WordPress plugin
Posted by Hari onThursday, 3 July 2014
There is no WordPress newsletter plugin with Captcha feature to show in newsletter signup forms. But there are plenty of custom Captcha jQuery plugins which we can use. I found a jQuery plugin which works perfect with MailPoet Newsletter WordPress plugin. The Ebcaptcha jQuery plugin works great with this MailPoet Newsletter plugin.
2. Place the HTML code in widget.
3. Download and extract Ebcaptcha and copy the required code from the sample html file.
4. Now place the Ebcaptcha code in the same widget where you placed the newsletter HTML code.
This is it. Now you have successfully integrated the captcha with newletter sign up box. Refresh your browser and you can find the Ebcaptcha integrated with MailPoet Newsletter plugin. Finding it difficult let me know i can fix.
How to add Ebcaptcha to MailPoet Newsletter WordPress plugin:
1. In WordPress blog create a newsletter signup form in MailPoet plugin and copy the HTML code.2. Place the HTML code in widget.
3. Download and extract Ebcaptcha and copy the required code from the sample html file.
4. Now place the Ebcaptcha code in the same widget where you placed the newsletter HTML code.
This is it. Now you have successfully integrated the captcha with newletter sign up box. Refresh your browser and you can find the Ebcaptcha integrated with MailPoet Newsletter plugin. Finding it difficult let me know i can fix.
at
11:18
0
comments
Labels:
jQuery,
WordPress
Share on Twitter, Facebook, Delicious, Digg, Reddit Email This BlogThis! Share to X Share to Facebook
Share on Twitter, Facebook, Delicious, Digg, Reddit Email This BlogThis! Share to X Share to Facebook
How to add custom js files in WordPress blog
Posted by Hari on
Generally we choose to add custom .js files in the <head> section of any page and this is same for the WordPress blog also. But most of the times .js files may not work as you expect them to. In this case simply put all the code in the Text widget in WordPress including the js files and jQuery library. This seems to work. This has worked for me when I was working for a client project.
at
10:57
0
comments
Labels:
WordPress
Share on Twitter, Facebook, Delicious, Digg, Reddit Email This BlogThis! Share to X Share to Facebook
Share on Twitter, Facebook, Delicious, Digg, Reddit Email This BlogThis! Share to X Share to Facebook
Subscribe to:
Comments (Atom)