Official Wasa Kredit payment extension for Magento. Allows store builders to offer Wasa Kredit as a payment option.
Table of Content
calculate_leasing_cost
and validate_allowed_leasing_amount
to new generic ones called calculate_monthly_cost
and validate_financed_amount
.calculateLeasingCost
)Type | Version | Status |
---|---|---|
Enterprise | 1.14.2.3 | Tested |
Community | 1.9.3.0 | Tested |
Community | 1.9.1.1 | Tested |
Community | 1.8.1.0 | Tested |
System > Cache Management
.Proceed to System > Configuration > Sales > Payment Methods
.
Fill in your assigned Partner ID and Client Secret ID.
Fill in your base domain and the url to the thank you page
Put in test mode.
If your system use a custom field for the organisations number, please fill in “Custom organisation number field”.
Add <?php echo Mage::helper('wkcheckout')->createProductWidget($_product); ?>
to your desired view (example: app/design/frontend/{choosen theme (default is 'rwd')}/default/template/catalog/product/view.phtml
). Make sure you pass in a product object such as $_product.
To calculate and display the leasing cost for each product in a list, use the calculateLeasingCosts
method as seen below:
(app/design/frontend/{choosen theme (default is 'rwd')}/default/template/catalog/product/list.phtml
)
Retrieve the leasing costs for every product in a list and store them in a variable.
<?php $leasingCosts = Mage::helper('wkcheckout')->calculateLeasingCosts($_productCollection); ?>
Display each leasing cost using the corresponding product id.
<?php echo $leasingCosts[$_product->getEntityId()]; ?>
To format the output, use the following syntax.
<?php echo Mage::getStoreConfig('payment/wkcheckout/active') && $leasingCosts[$_product->getEntityId()] ? '<p>'.'Leasing '.$leasingCosts[$_product->getEntityId()].' kr/mån'.'</p>' : ''; ?>
Example of implementation on product list page:
<?php echo Mage::helper('wkcheckout')->calculateLeasingCost($_product); ?>
Will return a string representation of the monthly leasing amount:
"650"
<?php echo Mage::helper('wkcheckout')->calculateLeasingCosts($_productCollection); ?>
will result in the following response:
[{
"monthly_cost": {
"amount": "631",
"currency": "SEK"
},
"product_id": "2"
}, {
"monthly_cost": {
"amount": "650",
"currency": "SEK"
},
"product_id": "1"
}]
.
├── app
│ ├── code
│ │ └── local
│ │ └── Wasa
│ │ └── Wkcheckout
│ │ ├── Block
│ │ │ ├── Form
│ │ │ │ └── Wkcheckout.php
│ │ │ ├── Info
│ │ │ │ └── Wkcheckout.php
│ │ │ └── Redirect
│ │ │ └── Wkcheckout.php
│ │ ├── Helper
│ │ │ └── Data.php
│ │ ├── Model
│ │ │ ├── Checkout.php
│ │ │ ├── System
│ │ │ │ └── Config
│ │ │ │ └── Source
│ │ │ │ └── Dropdown
│ │ │ │ └── Values.php
│ │ │ └── Wkcheckout.php
│ │ ├── controllers
│ │ │ └── CheckoutController.php
│ │ ├── etc
│ │ │ ├── config.xml
│ │ │ └── system.xml
│ │ └── sql
│ │ └── wkcheckout_setup
│ │ └── install-1.0.0.0.php
│ ├── design
│ │ └── frontend
│ │ └── base
│ │ └── default
│ │ └── template
│ │ └── wkcheckout
│ │ ├── form
│ │ │ └── wkcheckout.phtml
│ │ ├── redirect.phtml
│ │ └── widget
│ │ └── widget.phtml
│ └── etc
│ └── modules
│ └── Wasa.xml
├── docs
│ └── wasa_kredit_logotype.png
├── lib
│ └── Wasa
│ └── php
│ └── client-sdk.php
├── skin
│ └── frontend
│ └── base
│ └── default
│ └── wasa
│ ├── css
│ │ └── checkout.css
│ ├── fonts
│ │ ├── intro-cond-bold.ttf
│ │ └── intro-cond-regular.ttf
│ └── img
│ └── wasa-kredit.svg