README
Sezzle simple SDK
This SDK is a simple way to include sezzle widget onto a merchant's website.
Think of it as a light version to our own Sezzle-js
Every thing is packaged within the SDK i.e All the images, css is within the bundle.js file
What makes this sdk interesting is that it has a different approach compared to our sezzle-js.
Configurations
amount
- required , Example:$ 25
numberOfPayments
- This config is optional. defaults to4
minPrice
- This config is optional. It defaults to0
- in centsmaxPrice
` - This config is optional. It defaults to 250000 - in centsaltModalHTML
- This config is optional.apModalHTML
- This config is optional.qpModalHTML
-This config is optional.widgetTemplate
- This config is optional. It defaults to ~or 4 interest-free payments of %%price%% with %%logo%% %%info%%
alignmentSwitchMinWidth
- This config is optional. It defaults to760
;alignmentSwitchType
- This config is optional. It defaults to ``alignment
- This config is optional. It defaults toleft
fontWeight
- This config is optional. It defaults to300
fontSize
- This config is optional. It defaults to12
in pixelfontFamily
- This config is optional. It defaults toinherit
maxWidth
- This config is optional. It defaults to400
textColor
- This config is optional. It defaults to#111
.renderElement
- This config is optional. It defaults tosezzle-widget
.apLink
= - This config is optional. It defaults tohttps://www.afterpay.com/terms-of-service
.widgetType
- This config is optional. It defaults toproduct-page
.bannerURL
- This config is optional. It defaults to ``.bannerClass
- This config is optional. It defaults to ``.bannerLink
- This config is optional. It defaults to ``.marginTop
- This config is optional. It defaults to0
.marginBottom
- This config is optional. It defaults to0
.marginLeft
- This config is optional. It defaults to0
.marginRight
- This config is optional. It defaults to0
.logoSize
- This config is optional. It defaults to1.0
.fixedHeight
- This config is optional. It defaults to0
.logoStyle
- This config is optional. It defaults to{}
.
Functions
renderModalByfunction()
Note - This invokesSezzle Modal
by a function.alterPrice(newPrice)
Note - Alters price on widget.isMobileBrowser()
Note - Returns true on mobile browser.getElementToRender()
Note - Returns Element where the widget will be rendered.
Example
One simply has to make place for the widget on his html
with a div which has an id of sezzle-widget
.
Our SDK searches for this element on the DOM and renders our widget.
<script>
var renderSezzle = new AwesomeSezzle({
amount:'$ 25',
marginTop:-20
})
renderSezzle.init();
</script>
sezzle-dev.myshopify.com