Short Codes

The plugin uses a number of short codes:

1. [dpsc_checkout] – Use this shortcode to make the Checkout Page. This should be pasted into your “Checkout” page.

2. [dpsc_thank_you_page] – Use this shortcode to make the Thank You Page. This should be pasted into your “Thank You” page.

3. [dpsc_display_product] – Use this shortcode to display your products. This should be pasted into each and every product that you create so that DukaPress recognises each of those posts as a product and not just another blog post. Please enter this shortcode as is without modifying it or adding anything to it. If you, alternatively, want to display a “Buy Now” instead of “Add to Cart” button, then use [dpsc_display_product buy_now=”yes”] or  [dpsc_display_product affiliate=”yes”] instead. Learn more here. To show only the product information without images use [dpsc_display_product images=’false’]

4. [dpsc_display_product_image_only] – used inside a product and displays only the product image.

6. [dpsc_display_addcart] – (retired. Please use the widget) this shortcode works the same as [dpsc_display_product] but adds the shopping cart just below the “Add to Cart” button. This i useful for when you want to she the customer the result of his “Add to Cart” action. Used inside a product.

7. [dp_order_log] – Use this shortcode to generate an area where logged-in users of your website can view their purchases in your shop in an order log. This shortcode is best used in a WordPress page, perhaps names “Order Log” or “My Account”.

8. [dpsc_grid_display] – Use this shortcode to display products in a Grid layout. This particular shortcode has these variables that you need to define:

  1. category – should contain products category id – you can have more than one id separated by commas. How do you find a category id?
  2. total – defines the number of products that should be displayed.
  3. column – is the number of columns in which you want to display products
  4. per_page – this is the number of products to display per page
  5. order – defines how the products will be ordered. Possible values are ASC, DESC or rand. You can only use one at time.

For example:
[dpsc_grid_display category=”1” total=”12″ column=”3″ per_page=”4″ type=”duka” order=”DESC”]
This will display products from category ID 1, in three columns accross the page. It will display a total of 12 products, with 4 products on every page. The products will be ordered in a descending way. Kindly note that you have to change category=”1” to bear the category id of your products.

The type=duka tells DukaPress to display products from the new (as of DukaPress 1.2.0) products post type. Remove it if you are not using custom post types (why would you not, though?).

You have to enter this shortcode defined in this way as [dpsc_grid_display] on its own will NOT work.

Buy Now Buttons
If you add the modifier direct=”true” to the shortcode, then you will have “Buy Now” buttons instead of “Add to Cart”. This will look like so: [dpsc_grid_display category=”1” total=”12″ column=”3″ per_page=”4″ type=”duka” order=”DESC” direct=”true”]

Affiliate Mode
If you add the modifier affiliate=”yes” to the shortcode, then you will have “Buy Now” buttons instead of “Add to Cart”. These buttons will redirect to an external URL when clicked. This will look like so: [dpsc_grid_display category=”1” total=”12″ column=”3″ per_page=”4″ type=”duka” order=”DESC” affiliate=”yes”]

9. [dpsc_related_products] – Use this to show related products on a product page

PS
In case you are wondering what to do with shortcodes, click here to read a great deal about them. Basically, what you need to do is to copy the shortcode and paste it into the post (into the area where you would otherwise write your normal post/page content).

© 2024 DukaPress. All rights reserved.
Design By Madoido.