We realise that sometimes short codes just won’t do and one needs the flexibility to create page templates. Fortunately, this is rather easy with DukaPress. ๐
Use this to make the Checkout Page
Use this to make the Thank You Page
Use either of these to display the product in a single page/post
//shows "Add to Cart" button
//shows "Buy Now" button
Use this shortcode to generate an order log
Use this to display products in a Grid layout
This particular piece of code has three variables that you need to define:
- category – should contain the products category id โ you can have more than one id separated by commas.
- total – defines the number of products should be displayed.
- column – is the number of columns in which you want to display products
- per_page – this is the number of products to display per page
- order โ defines how the products will be ordered. Possible values are ASC, DESC or rand. You can only use one at time.
For example:
This will display products from category ID 1, in three columns accross the page. It will display a total of 12 products, with 4 on each page. The products will be ordered in a descending way:
Use this to make a custom search results template
This bit of code needs to be placed inside the page in which you intend to display your search results – using the DukaPress Search widget. It takes two parameters:
- column – is the number of columns in which you want to display products
- per_page – this is the number of products to display per page
When in use, the search shortcode should look something like:
This will show 12 results per page arranged in three columns.
The Shopping Cart
As you may know, DukaPress has got widgets to display the shopping cart on sidebars and other widget areas. What if you want to embed these onto a page template? Simple:
Mini Shopping Cart:
Detailed Shopping Cart:
The above should be inside DIV tags with class=โdpsc-shopping-cartโ