-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
210 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,169 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>salejs</title> | ||
<link rel="stylesheet" type="text/css" media="all" href="/styles/style.css"> | ||
</head> | ||
<body> | ||
<div class="navigation"> | ||
<div class="navigation-inner"> | ||
<div class="navigation-left"> | ||
<p class="selected">RU</p> | ||
<a href="/">EN</a> | ||
| ||
| ||
<a href="#docs">Документация</a> | ||
<a href="https://github.com/alexeypetrushin/salejs" target="_blank">Исходники</a> | ||
<a href="mailto:alexey.petrushin@gmail.com" target="_blank">Обратная связь</a> | ||
</div> | ||
<div class="navigation-right"> | ||
<a href="#" class="navigation-button cart-button" style="display: none;"> | ||
<span class="cart-button-quantity">0</span> | ||
<span class="cart-button-label">товаров</span> | ||
</a> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<!-- Header with demo. --> | ||
<div class="section darken"> | ||
<div class="section-inner"> | ||
<div class="products"> | ||
<div class="product"> | ||
<div class="product-image"> | ||
<img src="/images/iphone.png"> | ||
</div> | ||
<a href="#" class="button cart-buy-button" data-name="iPhone" data-price="999" data-quantity="1">Купить 34 000 руб.</a> | ||
</div> | ||
<div class="product"> | ||
<img src="/images/nexus.png"> | ||
<a href="#" class="button cart-buy-button" data-name="Nexus" data-price="450" data-quantity="1">Купить 18 000 руб.</a> | ||
</div> | ||
</div> | ||
<div class="products-description"> | ||
Виджет Корзины<br/> | ||
превращает любой<br/> | ||
Сайт в Магазин | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<!-- Documentation. --> | ||
<div class="section"> | ||
<div class="section-inner"> | ||
<!-- <div class="alert"> | ||
<table width="100%"> | ||
<tr> | ||
<td width="45%" valign="top"> | ||
<b>Внимание:</b> у меня через месяц будет пару свободных дней, напишите ваши пожелания - | ||
какой функционал вам нужен, я его постараюсь добавить. По возможности | ||
проиллюстрируйте примерами чтобы было понятно что требуется сделать. | ||
Почта для связи alexey.petrushin at gmail.com | ||
</td> | ||
<td width="10%"> </td> | ||
<td valign="top"> | ||
<b>Attention:</b> I'll have couple of a free days soon, if you'd like some | ||
feature to be added please let me know about it, what do you need? My contacts | ||
alexey.petrushin at gmail.com | ||
</td> | ||
</tr> | ||
</table> | ||
</div> --> | ||
|
||
<p id="docs">1. Добавьте sale.js в HTML страницы и проставьте нужные опции</p> | ||
<pre><code class="prettyprint"> | ||
<script src="http://salejs.com/v1/cart.js"></script> | ||
<script> | ||
cartjs.initialize({ | ||
emailOrdersTo : 'your-shop@mail.com', | ||
language : 'russian', // Также доступны 'english' и 'ukrainian'. | ||
currency : 'руб.', | ||
|
||
// Дополнительные опции, можно их не указывать. | ||
requireName : true, // Спрашивать имя покупателя. | ||
requirePhone : true, // Спрашивать телефон покупателя. | ||
requireEmail : false, // Спрашивать почту покупателя. | ||
requireAddress : false, // Спрашивать адрес покупателя. | ||
}) | ||
</script> | ||
</code></pre> | ||
|
||
<p>2. Добавьте кнопку Корзины на ваш сайт</p> | ||
<pre><code class="prettyprint"> | ||
<a href="#" class="cart-button" style="display: none;"> | ||
<span class="cart-button-quantity"></span> | ||
<span class="cart-button-label"></span> | ||
<!-- Опционально, вместо span элементов можно поместить сюда картинку для кнопки. --> | ||
</a> | ||
</code></pre> | ||
|
||
<p>3. Добавьте кнопку "Купить" для продуктов</p> | ||
<pre><code class="prettyprint"> | ||
<a href="#" class="cart-buy-button" | ||
data-name="Nexus" | ||
data-price="450" | ||
data-quantity="1" | ||
>Buy $450</a> | ||
</code></pre> | ||
|
||
<p>или, опционально это можно сделать JavaScript'ом:</p> | ||
<pre><code class="prettyprint"> | ||
cartjs.add({ | ||
name : "Nexus", | ||
price : 450, | ||
quantity : 1 | ||
}) | ||
</code></pre> | ||
|
||
<p>4. Можно поменять положение всплывающего окна корзины</p> | ||
<pre><code class="prettyprint"> | ||
<style> | ||
.bootstrap-widget .popover {margin-left: -10px !important;} | ||
.bootstrap-widget .popover .arrow {margin-left: 10px !important;} | ||
</style> | ||
</code></pre> | ||
|
||
<p>И, используйте эту страницу как пример - нажмите "купить"<p> | ||
|
||
</div> | ||
</div> | ||
|
||
<div class="footer"> | ||
<div class="footer-inner"> | ||
<div class="footer-left"> | ||
<a href="http://jslang.info/projects/salejs">Как это работает</a> | ||
</div> | ||
<div class="footer-right"> | ||
Сделано <a href="http://alex-craft.com">Alex Craft</a> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<script> | ||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ | ||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), | ||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) | ||
})(window,document,'script','//www.google-analytics.com/analytics.js','ga'); | ||
|
||
ga('create', 'UA-54125691-5', 'auto'); | ||
ga('send', 'pageview'); | ||
</script> | ||
|
||
<script src="http://salejs.com/v1/cart.js"></script> | ||
<style> | ||
.bootstrap-widget .popover {margin-left: -88px !important;} | ||
.bootstrap-widget .popover .arrow {margin-left: 77px !important;} | ||
</style> | ||
<script> | ||
cartjs.initialize({ | ||
emailOrdersTo : 'dummy@mail.com', | ||
language : 'russian', | ||
currency : 'руб.' | ||
}) | ||
</script> | ||
|
||
<script src="https://google-code-prettify.googlecode.com/svn/loader/run_prettify.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters