Skip to content

Template Files

romoxi edited this page Oct 5, 2020 · 12 revisions

Smarty template files are used for layout.

The template files (*.tpl) are located in:

 `\templates\wiki-plugins\`

and are named as followed

 `wikiplugin_bobshop_*.tpl`

where * is the name of the template

button_add.tpl

Shows the "add to cart" button.

Available Variables:

  • productId
  • addToCartButtonText

Required FORM action is:

  • action="{query _type=relative _keepall=y}"

Required FORM fields are:

  • productId > the producId from the products tracker
  • action > add_to_cart

shop.tpl

Shows all products.

A button links to the detailpage is provided

shop_article_detail.tpl

Shows one product in Detail.

The add to cart button is displayed.

If there is a wikipage stored in the products tracker, it will be displayed.

login.tpl

Includes the TikiWiki Module login_box. Shows a link to href="bobshop_register.php"

userdetail_inc.tpl

Shows a table with the current user address.

cart.tpl

Shows the shopping cart

cartdetail_inc.tpl

Shows the shopping cart in detail Calculation of all sum*-Fields for the checkout.tpl

cashierpage.tpl

Summary of the cart, shippment and userdata Userdata is included (userdetail_inc.tpl) Cart is included (cartdetail_inc.tpl) Selection for payment is provided

Available Variables:

  • userBobshop > userdata
  • showPayment > true (payment methode should be selectable)
  • payment > all payments from the payment tracker
  • order > data for the current order
  • user > current user
  • orderItems > products in the current order
  • shopConfig > config data
  • fieldNamesById

Required FORM action is:

  • action="tiki-index.php?page=bobshop_checkout"

Required FORM fields are:

  • payment > itemId from tracker payment
  • revocation > time
  • tos > time
  • action > checkout (hidden)

checkout.tpl

Shows a summary of all order details. A "Buy Now" Button is provided.

Required FORM action is:

  • action="tiki-index.php?page=bobshop_order_submitted"

Required FORM fields are: the sum-Fields will be stored in the orders-tracker

  • sumProducts > sum of all products in the cart
  • sumTaxratCat1 > sum of tax 1
  • sumTaxratCat2
  • sumTaxratCat3
  • sumTaxrates > sum of all taxes
  • sumShipping > summ of shipping costs
  • sumPayment > sum of payment costs
  • sumPaymentName > name of the payment
  • sumEnd > total sum, the buyer have to pay (will be used for PayPal)
  • action > order_submitted

message.tpl

Uses the Plugin REMARKSBOX for outputs.

##paypal_completed.tpl Show some THANX stuff after the buyer have succesfully payed per PayPal.