Checkout: Post/Page Embedding

WordPress Shopping Cart plugin: Post/Page Embedding

Making use of WordPress shortcodes and filtering the content of posts and pages has proven to make the WordPress Shopping Cart plugin extremely flexible. The plugin supports several different embedding codes of which many are automatically generated throughout the use of the plugin as WordPress posts/pages are created for shop categories, products, suppliers and more. Below is a list of embedding codes you can use in any of your WordPress posts/pages as needed.

All the shortcodes below can be easily accessed through the TinyMCE editor button made available by the plugin. See the TinyMCE editor button instructions. Ensure that you have the TinyMCE button for the Checkout plugin turned on under Checkout > Configuration, in the ‘General Configuration’ box.

 

Shop Categories

Single Category with Products

Show a single category page with the category title/name, its description, keywords, image (if applicable) and also the products which were assigned to the specified category. Replace “X” to the ID of the shop category you wish to display in the WordPress post/page.

[wpcocategory id=X]

Embed a hierarchical list of shop categories in the plugin database as links into a post/page.  When a category link is clicked, the user will be taken to the shop category post/page with its image, description, etc. and the products belonging to it. By default, a bullet list with links will be shown. If you use category images, you may want to display a grid by adding a type=”grid” parameter to the shortcode. That is [wpcocategories type=”grid”].

[wpcocategories]

To display categories in a grid, use this shortcode:

[wpcocategories type="grid"]

To do sorting on categories, you can use “sort” and “sortby” parameters. The “sortby” parameter can be id, title, modified, created. And the “sort” parameter is simply ASC for ascending or DESC for descending. Like this:

[wpcocategories sortby="title" sort="ASC"]

To display only category parent you must use the “parentsonly” parameter.

[wpcocategories parentsonly="true"]

Sub-Categories

You can order your sub-categories in either “ASC” (ascending – A to Z, first to last, lowest to highest) or “DESC” (descending – Z to A, last to first, highest to lowest) and you can order them by page “id”, or the page “title”, the date “created”, or the date “modified”. See the example below which would display my category with the id of 3, and would order the sub-categories by the date created from the first sub category created to the latest created (ascending order).

[wpcocategories id=”3” suborder=”ASC” suborderby=”created”]

 

Shop Products

Display all products in the database with paging.

[wpcoproducts]

Single Product

Display a full product pitch page/overview within a WordPress post/page. Change the “X” to the ID of the product in question. With the product embedding code, you can display the product image, additional images, price, custom fields, content tabs and other attributes inside a WordPress post or page so that users can add the product to their shopping cart.

[wpcoproduct id=X]

Featured Product

Display your featured products within a WordPress post/page.

[wpcofeaturedproducts]

Include/ Exclude Products

Include or exclude some of your products with a shortcode. Change the “X” to the ID of the product that you need to include or exclude.

[checkout_products include="x"]
[checkout_products exclude="x"]

Product Button

If you only wants to display a button to purchase a product and no image or description of the product, use this shortcode. This means that only an “Add to cart” button will appear without any other product information. Change the “X” to the ID of the product that you need.

[checkout_product_button id="X"] or [checkout_product display="button" id="x"]

Price Button

If you only wants to display a price of a product to purchase a product and no image or description of the product use this shortcode. Change the “X” to the ID of the product that you need.

[checkout_product display="price" id="x"]

 

Shopping Cart

Generates a dynamic shopping cart/basket inside a WordPress post/page. This embedding code will display the current shopping cart contents and allow the customer to manage the shopping cart by entering a coupon code, deleting items in the cart, changing the quantities and much more.

[wpcocart]

 

All Suppliers

Show a unordered bullet list of suppliers in the Shopping Cart plugin.

[wpcosuppliers]

 

Single Supplier with Products

Display the details/information of a product supplier by ID together with a list/grid view of the products belonging to that supplier. Replace “X” with the ID of the specified supplier you wish to display.

[wpco_supplier_X]

 

Supplier Grid

Use this parameter in your shortcode if you want to display your suppliers in a grid.

[checkout_supplier display=”grid”]

You can also use the, “Shopping cart Functions,” button to insert any of the the shortcodes mentioned already. When creating or editing any existing post or page you will see a little green shopping cart icon at the top of the TinyMCE (WYSIWYG) editor.

Clicking that button will open up an over-lay window with a few tabs which relate to different shortcodes. Have a look at the image below for an example of what can be done:

This will end up inserting the following code into the post/page:

[wpcocategories id=”10” suborder=”ASC” suborderby=”id”]

 

Give it a try and learn the different WordPress Shopping Cart plugin functions.

Beautiful Newsletter Templates

Professional newsletter templates that are fully responsive for desktop, tablet, and mobile. They are 100% cross-client compatible.

See Them

Pin It on Pinterest