• Skip to main content
  • Skip to primary sidebar
  • Skip to footer

EqualServing

WooCommerce, ActiveCampaign, 1ShoppingCart, Infusionsoft Expertise.

  • Services
    • Build Websites
    • Task Automation
      • ActiveCampaign Marketing Automation
      • Process Automation with Infusionsoft
    • Website Content Migration
    • Service Bundles
    • Third Party Software Integration
    • WordPress Plugin Development
  • About Us
  • Contact
  • Blog
  • Shop
    • Service Bundles
    • WordPress Plugin For 1ShoppingCart.com V2.0
    • WordPress Themes
    • All Our WordPress Plugins
  • Support
    • FAQ – 1ShoppingCart Plugin For WordPress – GENERAL
    • FAQ – 1ShoppingCart Plugin For WordPress – FREE
    • FAQ – 1ShoppingCart Plugin For WordPress – PREMIUM
    • Contact Support
You are here: Home / Archives for Wordpress

Using Wordpress

Wordpress is the most popular software to build websites. Because of Wordpress' popularity, there are many plugins written for it. We have written articles to help you make the best of Wordpress and add plugins or integrate APIs and services into the site to broaden its capability.

ActiveCampaign Last Order Details

August 26, 2019 by Michele Leave a Comment

I have a B2B client, who wants to remind customers to place an order if they have not ordered in the last 35 days.

Since orders do not vary much, the goal was to send the customer the details of the last order 35 days after the purchase so they could easily re-order.

This client uses the WooCommerce Deep Data Integration, and ActiveCampaign stores the order details in the CRM. In an ideal world, we should be able to simply insert a tag in the email to display the details of the last order. Included in the email should be an introduction text explaining that it has been five weeks since their last order, plus a call to action to refresh inventory levels.

Sadly, this is not possible. The full order, while stored in ActiveCampaign, is not retrievable for purposes of inserting into an email. Using personalization tags, you can insert any of the elements below but you are unable to insert all the products purchased. If the customer purchased five (5) products in the last order, only the last product in the order would be available to insert into the email.

ActiveCampaign eCommerce Personalization Tag Names

  • Contact’s total revenue
  • Contact’s total # of orders
  • Total # of products ordered
  • Price of last order
  • Currency of last order
  • Shipping method of last order
  • Product count of last order
  • ID of last product purchased
  • Name of last product purchased
  • Category of last product purchased

For more information about ActiveCampaign’s Deep Data Personalization, please see this ActiveCampaign help page.

Being a programmer and the author of the WooCommerce ActiveCampaign plugin, I thought I could enhance the plugin and store the details of the last order in a custom text field in ActiveCampaign. After considering this idea, however, I realized that it did not make sense to limit the orders to the very last order. Furthermore, why store that information in parallel to the data already collected via the Deep Data Integration?

What is possible Without Coding?

Our goal – remind customers to purchase if they have not placed an order in the last 35 days and provide a way to see the details of their last order.

First and foremost, we need to record the date of the last order in ActiveCampaign. This can be done via an automation that ActiveCampaign published in their Marketplace called Store Last Purchase Date.

A second automation is needed to trigger the email after the number of specified days, 35 in our case. ActiveCampaign published that automation recipe in the Marketplace. It is called Reminder to Re-Purchase.

Note: Make sure you create a custom date field in ActiveCampaign before importing either of these automation recipes so that you can select the proper field when prompted.

All our customers have registered accounts in WooCommerce. So, we insert a link to the customer dashboard in the email to make it easy for each customer to view the details of recent orders. That dashboard page is located at https://{website}/my-account/orders/.

This approach satisfies the basic requirement – we notify the customer and using a link on the WooCommerce page, the customer is able to view the details of their recent orders.

WooCommerce Customer Dashboard list of recent orders

What Is Possible With A Bit Of Coding?

My client does not have a very extensive list of products and I thought it would be nice to display all the unique products the customer ever purchased with an ‘Add to Cart’ button for easy re-ordering.

We accomplished that additional requirement by adding a little piece of code from Business Bloomer to the theme’s functions.php file. You can find it at https://businessbloomer.com/woocommerce-display-products-purchased-user/. This piece of code will display the products in the same grid format used in the WooCommerce shop as shown below.

WooCommerce customer dashboard recent orders with grid of unique product purchased.

Our Final Rendition

WooCommerce customer dashboard showing list of recent orders plus table or unique products purchased perfect substitute for ActiveCampaign Last Order Details.

While the above certainly satisfied the requirements, I was not happy with the display. So, I did a little more research and found a free plugin called WC Product Table Lite that presents products in a nicely formatted table rather than the default WooCommerce grid.

WC Product Table Lite lets you create a table with only the columns you want in the order you prefer and the button text you specify. I created my table with the columns – Image (Image), Title (Name), Excerpt (Description), Price, Qty and Add to Cart button. For a list of tutorials to create your first table, go to https://wcproducttable.com/tutorials.

I then tweaked the code I found on Business Bloomer. I swapped out the original shortcode to use the newly created WC Product Table Lite shortcode and I added a <div tag to align the table under the orders table and included a title for the section.

I changed this line from –

return do_shortcode("[[products ids='$product_ids_str']]");

To the following line where ‘99999’ is the id of the WC Product Table you create.

return '<div class="woocommerce-MyAccount-content"><header class="woocommerce-Purchases-title title"><h4>Products You Have  Purchased</h4></header>'.do_shortcode("[product_table id='99999' ids='$product_ids_str']")."</div>";

Additionally, I wanted to only have this table appear on two pages “/my-account/downloads” and “/my-account/orders.” This was accomplished by inserting the following code at the very top of the function.

	global $wp;
	$url = home_url( $wp->request );
	if (substr($url,-21)=="/my-account/downloads" || substr($url,-18)=="/my-account/orders") {
	} else {
		return;
	}

When the customer logs in to our site to view their recent orders, they are presented with a page that looks like the snapshot below. We are much more satisfied with this final result because our customers find it easier to renew inventory levels with a few clicks.

The full code that we used can be found below:

/**
 * @snippet       Display All Products Purchased by User via Shortcode - WooCommerce
 * @how-to        Watch tutorial @ https://businessbloomer.com/?p=19055
 * @author        Rodolfo Melogli
 * @compatible    WooCommerce 3.6.3
 * @donate $9     https://businessbloomer.com/bloomer-armada/
 * @modified      EqualServing to use WC Product Table Lite instead of WooCommerce grid
 */

add_shortcode( 'eswcac_purchased_products', 'eswcac_products_bought_by_curr_user' );

function eswcac_products_bought_by_curr_user() {
	global $wp;
	$url = home_url( $wp->request );
	if (substr($url,-21)=="/my-account/downloads" || substr($url,-18)=="/my-account/orders") {
	} else {
		return;
	}

    // GET CURR USER
    $current_user = wp_get_current_user();
    if ( 0 == $current_user->ID ) return;

    // GET USER ORDERS (COMPLETED + PROCESSING)
    $customer_orders = get_posts( array(
        'numberposts' => -1,
        'meta_key'    => '_customer_user',
        'meta_value'  => $current_user->ID,
        'post_type'   => wc_get_order_types(),
        'post_status' => array_keys( wc_get_is_paid_statuses() ),
    ) );

    // LOOP THROUGH ORDERS AND GET PRODUCT IDS
    if ( ! $customer_orders ) return;
    $product_ids = array();
    foreach ( $customer_orders as $customer_order ) {
        $order = wc_get_order( $customer_order->ID );
        $items = $order->get_items();
        foreach ( $items as $item ) {
            $product_id = $item->get_product_id();
            $product_ids[] = $product_id;
        }
    }
    $product_ids = array_unique( $product_ids );
    $product_ids_str = implode( ",", $product_ids );

    // PASS PRODUCT IDS TO PRODUCTS SHORTCODE
    return '<div class="woocommerce-MyAccount-content"><header class="woocommerce-Purchases-title title"><h4>Products You Have  Purchased</h4></header>'.do_shortcode("[[product_table id='5399' ids='$product_ids_str']]")."</div>";
}

Filed Under: ActiveCampaign, WooCommerce, Wordpress

Missing Indexes and/or Missing Auto_Increment Attribute

August 12, 2019 by Michele Leave a Comment

When migrating a WordPress installation from one server to another, it is important that you verify the integrity of the database. The tables can be created properly but you must check for missing indexes and ensure that all primary key columns have the AUTO_INCREMENT column attribute.

Missing indexes and auto_increment column attributes in a WordPress database throw error messages which make it difficult to debug the problem and fix your WordPress installation.

When tables are missing indexes or the AUTO_INCREMENT column attributes are missing, data is saved to tables without a unique identifier which makes finding the data more difficult later when needed.

I got an email today from a person who paid to have their site migrated from one server to another. They told me about the horrendous process they had been through and yet they were still encountering problems.

When they tried to create a new page or post, they encountered this error – “You are currently editing the page that shows your latest posts.“

Missing index auto_increment can generate WordPress error - You are currently editing the page that shows your latest posts.

The person explained that they were not editing a page but creating a new page and the error message made absolutely no sense.

I did a search on Google and found numerous posts explaining that this error message was generated when an index was missing on the wp_posts table. This particular WordPress installation was a multi-site instance which complicated matters because the main site worked fine – new posts could be added without issue. It was the sub-site that was having the problem. So, I checked the wp_posts, wp_2_posts, and wp_3_posts tables in the database, I found that the indexes were in place. Thinking that the indexes could be corrupt, I deleted them and re-created them. The error still displayed.

Then I checked for the AUTO_INCREMENT attribute on the ID columns. Sure enough, they were missing on all the sub-site tables (wp_2_posts and wp_3_posts). I altered the tables to add it, retried the page and the error was gone.

The WordPress error messages generated don’t always make sense but if you encounter the error message “You are currently editing the page that shows your latest posts.” check your indexes and primary key column attribute for any missing AUTO_INCREMENT attributes.

Filed Under: Wordpress, Wordpress Errors

WordPress REST API V2

May 17, 2017 by Michele Leave a Comment

With the release of WordPress version 4.7, the REST API is now included in the core therefore you no longer need to install a plugin to use it.

Per Automattic, “WordPress is moving towards becoming a fully-fledged application framework, and we needed new APIs. This project was born to create an easy-to-use, easy-to-understand and well-tested framework for creating these APIs, plus creating APIs for core.”

We wanted to see how easy it is to build an application using the new REST API. So, we looked to solve a long-time pet peeve – finding a decent movie to watch on the many premium cable channels available. You probably thought we’d focus our attention on some revolutionary way we did business or launched websites. Nope. We try to optimize our free time just as much as we do our work day hours.

We were tired of scrolling through the hundreds of movies streaming through our cable packages and not being able to find a decent movie to watch.

Yes, it is true your cable box will allow you to sort movies by genre but not by rating and the rating that is used is not quite accurate, where do those ratings come from anyway? We’ve found IMDB and RottenTomatoes to be more reliable metrics and yes, we have had personal differences of opinion with IMDB but for the most part, the ratings are fairly accurate.

Problem to solve: Hundreds of movies are available to stream via HBO, Showtime and Netflix. Make it easy to find a well-rated movie in the genre of your choosing starring the actors of your choosing.

Answer to problem: movies.siteessential.com

Resources:

  • Guidebox’s free movie, TV and video API.
  • WPAPI a JavaScript Client for the WordPress REST API.
  • The OMDb API is a RESTful web service to obtain movie information.
  • Advanced Custom Fields WordPress Plugin

Explanation: We found the Guidebox API and we were delighted that it offered the information we needed – movie title, network, movie description, poster image, IMDB link and Rotten Tomatoes link.

Using the results from our requests to the Guidebox API as the driver, we added or updated posts in our WordPress installation with movie details. The second step was to make calls to the OMDb API to retrieve the ratings from IMDB and RottenTomatoes.

Users of the site can query by Network and/or Title and/or Actor and/or IMDB rating to find the movie of their choice.

Thoughts about the REST API

We loved it! We absolutely loved working with the REST API!

Searching posts using Advanced Custom Fields can require complex query strings when you are faced with multiple search criteria. We found searching posts using the REST API easy. Even populating posts with Advanced Custom Fields was made easy by using the REST API.

If you are building an AJAX application and want to make use of the REST API, you must install WPAPI – JavaScript Client for the WordPress REST API. This Javascript library is well maintained and documented and will remove the headache of accessing the WordPress tables.

We have been using movies.siteessential.com and happy with the results.

Filed Under: Wordpress Tagged With: API, REST API

Why I Use StudioPress’s Genesis Framework and Themes For WordPress Sites

March 14, 2015 by Michele Leave a Comment

When I first started building sites using WordPress, I downloaded a few different themes and took pieces from each to build the sites my clients wanted. Each theme had its own peculiar way of implementing things and, of course, with each new theme used I spent precious time learning that particular theme developer implemented their features.

In the summer of 2012, I learned about StudioPress. I read their blog and searched for sites that were using their themes. I was impressed with the diversity of the sites built with the StudioPress Framework.

I purchased the framework within the next few months and have been very happy. The support forum is moderated very well providing answers to questions about particular themes and advise on how to implement your own features. I found the third party developer community is quite active and, therefore, I am able to find plugins coded specifically for the StudioPress Framework to bring advanced functionality to my sites.

Primary Features To Consider

  • Ease Of Use - StudioPress provides full instructions on how to configure any one of their themes to look exactly as the theme is demonstrated on their website.
  • Developers Are Not Required - The framework and theme can easily be uploaded to your site via the WordPress Admin Dashboard. When a new release of the framework or theme is published, you will be notified via the dashboard and updating the framework and theme is as easy as clicking the Update button.
  • Responsive Design - If you want your visitors and customers to be able to access and read your site using a smartphone, tablet or desktop, you want your site to be responsive. StudioPress themes are responsive right out of the box. No additional configuration necessary.
  • Search Engine Optimization (SEO) - Afraid of all those SEO plugins available for WordPress? No worries, the StudioPress themes are fully optimized and they support the Schema.org code, which allows you to output microdata in your site’s code. This enhances your site’s search engine optimization even further. Click here to read more about the Schema.org code.
  • Unlimited Use - There are many theme developers that sell you a theme and restrict its use to just one site requiring you to make multiple purchases for each site you would like to install it on. Not with StudioPress, purchase the theme and framework and you can install it on as many sites as you require. How cool is that!
  • Developers Can Be Helpful - While you can install the Genesis Framework and child theme without needing a developer, should you have a very customized site in mind by all means contact us and let us know what you have in mind.
This list is just a brief list of the Genesis Features. Click here for a complete list of Genesis Framework features. Also, take a look at the Showcase of Sites where you will see what some people have done with their site design projects.

A Few Theme Examples

  • Hello! Pro Theme

    $99.95
    Learn More
  • AgentPress Pro Theme

    $99.95
    Learn More
  • News Pro Theme

    $99.95
    Learn More
  • Wellness Pro Theme

    $99.95
    Learn More
  • Pro Plus All-Theme Package

    $499.95
    Learn More
  • Simply Pro Theme

    $99.95
    Learn More
View More Themes
Do yourself a favor and take a look at the StudioPress Genesis Framework – there’s a good reason why many of the Internet Notables are using StudioPress.
  • Yoast (https://yoast.com/)
  • Jay Baer – Convince and Convert (http://www.convinceandconvert.com/)
  • ProBlogger (http://problogger.com)

FREE Genesis Guide for Absolute Beginners

If you are worried that the Genesis Framework is too advanced for you, go ahead and click on the image to the right to download your FREE Genesis Guide for Absolute Beginners. After reading it, you’ll see just how easy it is to install and configure a Genesis Theme.
Click to download the Genesis Guide for Absolute Beginners

Filed Under: Themes, Wordpress

WordPress Media Shortcode Explained

May 2, 2014 by Michele Leave a Comment

Inserting images in your posts or pages is quite easy in WordPress using the Add Media button. This post is meant to explain how the WordPress media shortcode is populated with the information from your media library.

Take a look at the image below. The body of the post as shown in the Text Editor is on the left side and the image (attachment) details is on the right side. I color coded the media gallery fields with their corresponding placement in the media ( [caption ] ) shortcode.

Explanation of WordPress Media Shortcode
How to read a media shortcode in WordPress.
  1. Title (red) – used in the anchor tag (< a href=”…) and again later in the image tag (< img src=”…). The text you enter in the Title field is used to name the image file. Avoid using titles like image1 or photo2 instead follow Google’s SEO Best Practices and use more descriptive names as I did in this example – “Bee in Wisteria.”
  2. Caption (blue) – used as the actual caption of the image
  3. Alt text (yellow) – used as the alt attribute of the image tag. This text will appear if for some reason the image is unable to download to the visitor’s browser. Again, use brief but descriptive terms.
  4. Alignment (orange) – used in the caption tag ([ caption ] ) is used to designate how the image will be aligned on the page with regard to the text that surrounds it. In this particular case the image will appear to the right of any text on the page.
  5. Link To (green) – this option is used if and only if you want the image to be a hyperlink, i.e. your site visitor can click on the image to bring them elsewhere. If you do not want the image to be a hyperlink, select None from the drop down list box. Your link to options are as follows:
    • Media File – when the visitor clicks on a link to the Media File, the full size image will appear within the browser.
    • Attachment Page – when the visitor clicks on a link to the Attachment Page, the image will display similar to how a post would appear on the site with a title, image and description.
    • Custom URL – if you would like your image to link to another page on our site or anywhere else on the internet, select this option and enter the URL. Your site visitor will be brought to that page when they click on the image.
    • None – choose this option, if you would like to embed the image without a hyperlink.
  6. Size (purple/pink) – select the size of the image you would like embedded in the page.

The shortcode used in the illustration above would be rendered on the page as shown below. Notice the 200px x 300px image is aligned to the right of the text with a caption beneath. Click on the image to display the media file.

Example of Media Shortcode Rendered on a Post.
Example of Media Shortcode Rendered on a Post.

If you would like to see how the different linking methods work, please go to this media shortcode demonstration page.

I mentioned Google’s SEO best practices in this article. If you would like to read the entire document, you can find Google’s Search Engine Optimization Starter Guide Here.

Filed Under: Wordpress, Wordpress Explained

What the Heck is MsoNormalTable? And How Did it Get in my Post?

March 17, 2014 by Michele Leave a Comment

Have you ever created a post or page in WordPress and found the following weird code staring at you?

<!--[if gte mso 9]><xml><br />
<w:WordDocument><br />
<w:View>Normal</w:View><br />
<w:Zoom>0</w:Zoom><br />
<w:PunctuationKerning/><br />
<w:ValidateAgainstSchemas/><br />
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid><br />
<w:IgnoreMixedContent>false</w:IgnoreMixedContent><br />
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText><br />
<w:Compatibility><br />
<w:BreakWrappedTables/><br />
<w:SnapToGridInCell/><br />
<w:WrapTextWithPunct/><br />
<w:UseAsianBreakRules/><br />
<w:DontGrowAutofit/><br />
</w:Compatibility><br />
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel><br />
</w:WordDocument><br />
</xml><![endif]--></p>
<p><!--[if gte mso 9]><xml><br />
<w:LatentStyles DefLockedState="false" LatentStyleCount="156"><br />
</w:LatentStyles><br />
</xml><![endif]--><!--[if gte mso 10]></p>
<style>
 /* Style Definitions */</p>
</style>
<p><![endif]--></p>

Yeah? Chances are you copied the content straight from Word and pasted it right into the WordPress editor. To prevent this from happening in the future use the Paste From Word feature as pictured below.

PasteFromWord

Using the Paste From Word feature strips out the Word formatting commands from your WordPress page or post.

  1. Copy your content from Word
  2. Click on the Paste From Word icon
  3. Paste your content from Word into the provided space
  4. Click on the Insert button

In the event that you do not see the Paste From Word icon in your editor, click on the Show/Hide Kitchen Sink icon . This will reveal a second row of editing icons/features.

For more information about the Paste From Word feature in wordpress, please see the WordPress Support page.

Filed Under: How To, Wordpress

W3 Total Cache Garbled My Simple Social Icons

March 5, 2014 by Michele Leave a Comment

I put it off long enough. My site was in desperate need of optimization. I installed the popular W3 Total Cache plugin and then began the task of configuring it for my needs. I will not get into the specifics here – I will let the plugin’s developers and experts guide you on the configuration.

I won’t lie, it took some time to get the site configured with W3 Total Cache but when all was said and done, I was sad to see that while the pages loaded much quicker, the graphics of the Simple Social Icons plugin displayed garbled nonsense. You can see what I’m talking about below –

simple-social-icons-garble

I found others had similar problems but what resolved their problems had already been coded and accounted for by the developers of the W3 Total Cache plugin.

I tried a few things to no avail but because I minified the CSS of the site, I went to the Minify settings at – {website.com}/wp-admin/admin.php?page=w3tc_minify and scrolled down to the Advanced area and specifically the Never minify the following CSS files setting. In Never minify the following CSS files field I entered the path to the Simple Social Icons’ style sheet which in my case was => /wp-content/plugins/simple-social-icons/css/style.css

Once I made that change …

Viola! Problem solved.

Filed Under: How To, Wordpress

How To Present An Infusionsoft Product Bundle with Gravity Forms

February 25, 2014 by Michele Leave a Comment

Last month, Infusionsoft hosted a Mastermind call about building a dynamic checkout process which started me thinking about how to implement such a feature for a client. By the way, if you are an Infusionsoft user and you are not attending the weekly Mastermind calls, you are really missing out. I have been well impressed with the topics they cover.

In the Mastermind Demonstration, which you can view at the Mastermind Archive, Corey Harding of Infusionsoft builds a dynamic checkout process using an Infusionsoft web form and an Infusionsoft product bundle link.

What is the Infusionsoft Product Bundle Link?

Through a product bundle link, Infusionsoft provides a mechanism to add multiple products to the shopping cart in one click.

As Corey explains in the video, the bundle link has to be “built” using the product ids and quantities included in the bundle. One stipulation in building the link – a product id CANNOT have a quantity of zero (0). Therefore, he uses a JavaScript (provided on the MM archive page) to remove any products with a quantity of zero (0) from the query string which is submitted to the Infusionsoft bundle process. If you include a product id with a quantity of zero (0) in the query string, the bundle link will fail.

The Infusionsoft bundle link has the following form where the query string lists the productId and productQuantity of all the products you want to add to the shopping cart –

https://{ifsapp}.infusionsoft.com/app/manageCart/processBundle?productId=1&amp;productQuantity=1productId=2&amp;productQuantity=10&amp;productId=3&amp;productQuantity=9

Once I saw what Corey did, I was sorry I did not think of it myself. It works especially well with Gravity Forms for a product that includes many options. Let’s say for demonstration purposes, I am selling a plugin. Along with the plugin, I offer an eBook that explains some of the nuances of the plugin and how to make the most of your purchase. I also offer installation of the plugin and an annual premium support plan. If the customer purchases 2 years of support in advance, I offer a 50% discount.

Using Gravity Forms Instead of Infusionsoft Webform

You can view my demonstration form at https://www.equalserving.com/useful-tools/infusionsoft-product-bundle-test/

I used Gravity Forms’ Product Pricing Fields to configure the form. The top field is a Single Product field with the quantity disabled (because this is presumed to be a digital product – there is no need for quantity). The installation, ebook and support fields also use a Product Pricing Field with Radio Buttons field type.

I included a hidden field on the form that contains a promo code for the multi-year support discount. This hidden field is unnecessary as you can configure purchase discounts in Infusionsoft that do not require a promo code but I included it anyway for this example.

Lastly, I dragged in a Total Pricing Field so that the customer could see how much the purchase was going to be before adding it to their cart.

Once the customer clicks on the button labelled “Process My Product Bundle,” the form is configured to redirect to the Infusionsoft product bundle link. Gravity Forms allows the fields of the form to be redirected to another page by clicking on the Form Settings | Confirmations. Select the Confirmation Type – Redirect; enter the Redirect URL and click the Merge Fields button to include the fields necessary in the bundle link. Below is a snapshot of my completed Confirmations screen –

infusionsoft_bundle_gravity_forms

Below is the default Infusionsoft bundle link –

https://{ifsapp}.infusionsoft.com/app/manageCart/processBundle

Below is the Redirect Query String I entered for my particular form. This field is activated when you enable the “Pass Field Data Via Query String” checkbox –

productId=35&productQuantity=1{AddOn Installation:4:value}{Taking Awesome Plugin to the Next Level - eBook:7:value}{Support:6:value}

The above query string as written will append only the values of the fields onto URL Redirect. The evaluated “raw un-filtered” Redirect URL with query string will look as follows:

https://{ifsapp}.infusionsoft.com/app/manageCart/processBundle?productId=35&productQuantity=1001

If the above was submitted, 1001 units of product id 35 would be added to the shopping cart. This, of course, is not what we want.

We must add code to ensure that only products with a quantity of more than zero (0) are added to the query string and that the parameters are properly formatted. Therefore, we must modify the theme’s functions.php file to include the following:

add_filter("gform_merge_tag_filter", "gv_filter_all_fields", 10, 4);
function gv_filter_all_fields($value, $merge_tag, $options, $field){

    if($field["formId"] == "84") {
    	if ($merge_tag == 4 && $value != 0) {
    		// Installation
    		$retVal = "&productId=39&productQuantity=".$value;
    	}
    	if ($merge_tag == 7 && $value != 0) {
    		// eBook
    		$retVal = "&productId=37&productQuantity=".$value;
    	}
    	if ($merge_tag == 6 && $value != 0) {
    		// Support
    		$retVal = "&productId=41&productQuantity=".$value;
    	}
    	if ($merge_tag == 9) {
    		// promoCode
    		$retVal = "&promoCode=".$value;
    	}
    } else {
    	$retVal = $value;
    }
    return $retVal;
}

The above function is triggered with the gform_merge_tag_filter filter. Line 4 evaluates the form id. If formId equals 84 (our bundle form), the function then interrogates the merge_tag and the value parameters. Depending upon which merge tag is passed, the proper productId is returned along with the value of the form field (product quantity). So, the above “raw unfiltered” Redirect URL with query string becomes –

https://{ifsapp}.infusionsoft.com/app/manageCart/processBundle?productId=35&productQuantity=1&productId=41&productQuantity=1&promoCode=MULT
I

Conclusion

Like everything in life and especially online, there are many ways to accomplish any one task. Using an Infusionsoft webform to create a dynamic product bundle is possible and requires no additional tools. But if you are already using Gravity Forms, and want to create a more pleasant customer experience why not put the process together using Gravity Forms?

Filed Under: eCommerce, How To, Infusionsoft, Wordpress

  • Go to page 1
  • Go to page 2
  • Go to Next Page »

Primary Sidebar

From the Blog

Help

» FAQs - PREMIUM 1SC Plugin For Wordpress
» FAQs - FREE 1SC Plugin For Wordpress

  • Services
    • Build Websites
    • Task Automation
      • ActiveCampaign Marketing Automation
      • Process Automation with Infusionsoft
    • Website Content Migration
    • Service Bundles
    • Third Party Software Integration
    • WordPress Plugin Development
  • About Us
  • Contact
  • Blog
  • Shop
    • Service Bundles
    • WordPress Plugin For 1ShoppingCart.com V2.0
    • WordPress Themes
    • All Our WordPress Plugins
  • Support
    • FAQ – 1ShoppingCart Plugin For WordPress – GENERAL
    • FAQ – 1ShoppingCart Plugin For WordPress – FREE
    • FAQ – 1ShoppingCart Plugin For WordPress – PREMIUM
    • Contact Support

Recent Articles

How To: Configure Our WooCommerce ActiveCampaign Plugin

August 11, 2019

Before we begin to configure our WooCommerce ActiveCampaign plugin, please know ActiveCampaign has four (4) subscription levels – Lite, Plus, Professional and Enterprise. The Plus, Professional and Enterprise subscriptions offer Deep Data Integration that works with WooCommerce and other popular eCommerce solutions to synchronize online sales with the ActiveCampaign CRM. This integration collects your contact’s […]

Sales Cadence ActiveCampaign Automation

August 8, 2019

I have been using ActiveCampaign for a few years and I am pleased with the functionality and the appealing price point. Recently, I was asked if a sales cadence contact flow recommended on the HubSpot blog could be implemented in ActiveCampaign. I reviewed the flow of activities and I was convinced that this was certainly […]

Coda Document – The New File Type

October 11, 2018

Coda is a new document type that combines the functionality of word processing, spreadsheets and databases into one document. Within a Coda document, you can build tables of data and easily embed results from the table directly in your text portions of your document. Those results can be a formula summing columns from a table […]

Import Products Hosted on 1ShoppingCart Into WooCommerce WordPress

July 27, 2017

Many people use the popular 1ShoppingCart eCommerce and marketing software to sell digital products and/or physical products but adding those products into your WordPress website can be very tedious and error-prone. Great News! You can now easily import your *simple* products hosted on 1ShoppingCart into WordPress. This method is free and does not require a […]

Abandoned Cart Reminder With WooCommerce and ActiveCampaign

March 3, 2017

In this article I will discuss how you can create an Abandoned Cart Reminder process for your WordPress site using WooCommerce and ActiveCampaign to boost sales and encourage customer engagement. Amazon uses this process all the time. Perhaps you have received one of those Amazon reminder emails saying you’ve added items to your cart and […]

Using Simple Social Icons with W3 Total Cache

January 9, 2017

In a previous post, W3 Total Cache Garbled My Simple Social Icons, I explained how to prevent your icons from being garbled by adding the Simple Social Icons style sheet to the list of style sheets that never get minified. This image on the left is the result after upgrading the Simple Social Icons plugin […]

Recent Posts

  • ActiveCampaign Last Order Details
  • Missing Indexes and/or Missing Auto_Increment Attribute
  • How To: Configure Our WooCommerce ActiveCampaign Plugin
  • Sales Cadence ActiveCampaign Automation
  • Coda Document – The New File Type

Recent Comments

    Archives

    • August 2019
    • October 2018
    • July 2017
    • May 2017
    • March 2017
    • January 2017
    • March 2015
    • September 2014
    • July 2014
    • May 2014
    • March 2014
    • February 2014
    • January 2014
    • November 2013
    • August 2013
    • July 2013
    • June 2013
    • February 2013
    • January 2013
    • December 2012
    • September 2012
    • August 2012
    • July 2012
    • June 2012
    • March 2012
    • December 2011
    • September 2011
    • February 2011
    • December 2008
    • September 2008
    • April 2008

    Categories

    • 1shoppingcart.com
    • ActiveCampaign
    • Amazon Associate
    • Coda
    • Digital Downloads
    • eCommerce
    • Flash
    • How To
    • Infusionsoft
    • Joomla
    • PHP Scripting
    • Projects
    • Resources
    • Themes
    • Web hosting
    • Windows XP
    • women in business
    • WooCommerce
    • Wordpress
    • Wordpress Errors
    • Wordpress Explained
    • Wordpress Plugin

    Meta

    • Log in
    • Entries feed
    • Comments feed
    • WordPress.org

    Footer

    Stay Connected

    Stay up to date with the latest news, product announcements, and more by signing up for our email newsletter. Don't forget to follow us on your favorite social sites as well.
    • Email
    • Google+
    • LinkedIn
    • RSS
    • Twitter
    • YouTube

    Contact Us

    EqualServing

    46 Amethyst Rd
    Palmyra, VA 22963

    727-490-7443 https://www.equalserving.com/wp-content/uploads/2013/11/eslogo_300x60.png $$
    Email :: Plugin Support
    • ActiveCampaign
    • How To
    • WooCommerce
    • WordPress Explained
    • Resources and Recommendations

    Copyright © 2021 · Web Development :: EqualServing.com on Genesis Theme Framework
    » You will find affiliate links on this site. When we find a company or individual that consistently delivers a high quality product or service, we will become an affiliate. «