Tips and Tricks WP eCommerce

eCommerce Solution for WordPress Blog

  • Home
  • eCommerce Plugins
  • WP eStore Documentation
  • WP Shopping Cart Doc

Customize the Shopping Cart Image/Icon in the Cart

The simple shopping cart plugin has a filter that you can use to customize the Shopping Cart image icon that is displayed at the top of the cart.

Code Example

The following code example shows how you can use your own custom cart image.

Upload your custom cart image via the media library so you have the URL of the cart image ready.

Add the following code block to your theme’s functions.php file and specify the actual custom cart image URL:

add_filter('wspsc_cart_icon_image_src', 'override_cart_image_icon');
function override_cart_image_icon($cart_img_src)
{
    //Specify the URL of your custom cart image
    $cart_img_src = 'http://www.example.com/uploads/my-custom-cart-image-icon.jpg';
    return $cart_img_src;
}

Filed Under: Additional Guidance, WordPress Shopping Cart Tagged With: cart shortcode, code example, Tweaks, WP Shopping Cart

Example Code for Custom Autoresponder Integration with WP eStore

This documentation is only for developers. If you are not a developer then you have no need to read this.

First read this post to understand some basics.

The following is an example code that shows you how use the item specific signup hook (this hook is called for each item that the customer purchases):

add_action('eStore_item_specific_autoresponder_signup', 'my_estore_custom_signup');
function my_estore_custom_signup($signup_data)
{
    eStore_payment_debug('Received request for item specific autoresponder signup action.', true);
    $firstname = $signup_data['firstname'];
    $lastname = $signup_data['lastname'];
    $email = $signup_data['email'];
    $list_name = $signup_data['list_name'];
    //TODO - write your autoresponder signup code here.
}

The value you specify in the “List Name” field (under the autoresponder settings section of the product) will be passed in the above function using the “list_name” parameter.

 

Filed Under: Additional Resources Tagged With: Autoresponder, code example, Tweaks

Running Additional Tasks After a Sale via the Simple Cart Plugin

You can run some additional tasks after the simple cart plugin has processed a sale.

Note that this should only be tried by a developer as it involves custom PHP coding.

The plugin has an action hook that gets fired after the PayPal IPN (Instant Payment Notification) data is processed. You can use this hook to do additional custom tasks. Below is an example snippet of code that shows you how to use this action hook.

Add the following block of code to your functions.php file of the theme:

add_action('wpspc_paypal_ipn_processed', 'wspsc_my_custom_ipn_tasks');
function wspsc_my_custom_ipn_tasks($ipn_data)
{
    //You can write the $ipn_data array's content to a file to see
    //what paypal sends in the IPN
    $firstname = $ipn_data['first_name'];
    $lastname = $ipn_data['last_name'];
    $email = $ipn_data['payer_email']
    //Do something with the data

}

The IPN message consists of variables and is available as an array inside your function. You can access an element of the array by using the proper variable name. To see a list of all the available variables please check the PayPal IPN documentation page.

Filed Under: WordPress Shopping Cart Tagged With: code example, e-commerce, Tweaks, WP Shopping Cart

Your Shopping Cart

Shopping Cart Empty
Shopping Cart is Empty
Visit The Shop

Search

Featured Documents

Stylish Product Display Options for WP eStore WP eStore Quick Setup and Usage Video Tutorial WP eStore Shortcodes and Functions Reference WordPress eStore Plugin Features WordPress eStore Plugin Demo What Our Customers Have to Say About Our Products WordPress eStore WishList (Feature Suggestions) WordPress eStore Frequently Asked Questions (FAQ) How to Show Add to Cart buttons

Featured Plugins

wordpress_estore_icon
wordpress membership plugin icon
WP Express Checkout Plugin
Lightbox Ultimate Plugin
wordpress_affiliate_plugin_icon

Copyright © 2023 | eCommerce Plugins