Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
addons
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Mario
addons
Commits
dec18d28
Commit
dec18d28
authored
Jul 25, 2018
by
Mario
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '3.6RC'
parents
2addc204
bc253ed4
Changes
101
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
101 changed files
with
19158 additions
and
474 deletions
+19158
-474
cart/cart.apd
cart/cart.apd
+3
-1
cart/cart.php
cart/cart.php
+636
-239
cart/currencycodes.json
cart/currencycodes.json
+1064
-0
cart/manual_payments.php
cart/manual_payments.php
+5
-1
cart/myshop.php
cart/myshop.php
+102
-53
cart/submodules/hzservices.php
cart/submodules/hzservices.php
+762
-0
cart/submodules/paypalbutton.php
cart/submodules/paypalbutton.php
+547
-0
cart/submodules/view/tpl/basic_checkout_ppbutton.tpl
cart/submodules/view/tpl/basic_checkout_ppbutton.tpl
+32
-0
cart/submodules/view/tpl/hzservices.itemadmin.skulist.tpl
cart/submodules/view/tpl/hzservices.itemadmin.skulist.tpl
+9
-0
cart/submodules/view/tpl/hzservices.itemadmin.tpl
cart/submodules/view/tpl/hzservices.itemadmin.tpl
+13
-0
cart/submodules/view/tpl/hzservices.itemedit.tpl
cart/submodules/view/tpl/hzservices.itemedit.tpl
+51
-0
cart/submodules/view/tpl/ppbutton_txndetails.tpl
cart/submodules/view/tpl/ppbutton_txndetails.tpl
+8
-0
cart/view/tpl/basic_cart.tpl
cart/view/tpl/basic_cart.tpl
+70
-44
cart/view/tpl/basic_catalog.tpl
cart/view/tpl/basic_catalog.tpl
+41
-23
cart/view/tpl/basic_checkout_manual_confirm.tpl
cart/view/tpl/basic_checkout_manual_confirm.tpl
+17
-19
cart/view/tpl/basic_checkout_start.tpl
cart/view/tpl/basic_checkout_start.tpl
+21
-9
cart/view/tpl/myshop_order.tpl
cart/view/tpl/myshop_order.tpl
+4
-0
cart/view/tpl/myshop_order_item_xtrahtml.tpl
cart/view/tpl/myshop_order_item_xtrahtml.tpl
+13
-2
diaspora/Receiver.php
diaspora/Receiver.php
+43
-23
diaspora/diaspora.php
diaspora/diaspora.php
+12
-1
diaspora/import_diaspora.php
diaspora/import_diaspora.php
+1
-1
gallery/Mod_Gallery.php
gallery/Mod_Gallery.php
+120
-0
gallery/gallery.apd
gallery/gallery.apd
+5
-0
gallery/gallery.php
gallery/gallery.php
+50
-0
gallery/lib/photoswipe/.gitignore
gallery/lib/photoswipe/.gitignore
+37
-0
gallery/lib/photoswipe/.jshintrc
gallery/lib/photoswipe/.jshintrc
+26
-0
gallery/lib/photoswipe/.travis.yml
gallery/lib/photoswipe/.travis.yml
+7
-0
gallery/lib/photoswipe/Gruntfile.js
gallery/lib/photoswipe/Gruntfile.js
+287
-0
gallery/lib/photoswipe/LICENSE
gallery/lib/photoswipe/LICENSE
+21
-0
gallery/lib/photoswipe/README.md
gallery/lib/photoswipe/README.md
+70
-0
gallery/lib/photoswipe/bower.json
gallery/lib/photoswipe/bower.json
+37
-0
gallery/lib/photoswipe/component.json
gallery/lib/photoswipe/component.json
+30
-0
gallery/lib/photoswipe/dist/default-skin/default-skin.css
gallery/lib/photoswipe/dist/default-skin/default-skin.css
+482
-0
gallery/lib/photoswipe/dist/default-skin/default-skin.png
gallery/lib/photoswipe/dist/default-skin/default-skin.png
+0
-0
gallery/lib/photoswipe/dist/default-skin/default-skin.svg
gallery/lib/photoswipe/dist/default-skin/default-skin.svg
+1
-0
gallery/lib/photoswipe/dist/default-skin/preloader.gif
gallery/lib/photoswipe/dist/default-skin/preloader.gif
+0
-0
gallery/lib/photoswipe/dist/photoswipe-ui-default.js
gallery/lib/photoswipe/dist/photoswipe-ui-default.js
+861
-0
gallery/lib/photoswipe/dist/photoswipe-ui-default.min.js
gallery/lib/photoswipe/dist/photoswipe-ui-default.min.js
+4
-0
gallery/lib/photoswipe/dist/photoswipe.css
gallery/lib/photoswipe/dist/photoswipe.css
+179
-0
gallery/lib/photoswipe/dist/photoswipe.js
gallery/lib/photoswipe/dist/photoswipe.js
+3734
-0
gallery/lib/photoswipe/dist/photoswipe.min.js
gallery/lib/photoswipe/dist/photoswipe.min.js
+4
-0
gallery/lib/photoswipe/package.json
gallery/lib/photoswipe/package.json
+46
-0
gallery/lib/photoswipe/photoswipe.json
gallery/lib/photoswipe/photoswipe.json
+26
-0
gallery/lib/photoswipe/src/css/_main-settings.scss
gallery/lib/photoswipe/src/css/_main-settings.scss
+9
-0
gallery/lib/photoswipe/src/css/default-skin/default-skin-svg.sketch/Data
...toswipe/src/css/default-skin/default-skin-svg.sketch/Data
+0
-0
gallery/lib/photoswipe/src/css/default-skin/default-skin-svg.sketch/metadata
...ipe/src/css/default-skin/default-skin-svg.sketch/metadata
+18
-0
gallery/lib/photoswipe/src/css/default-skin/default-skin-svg.sketch/version
...wipe/src/css/default-skin/default-skin-svg.sketch/version
+1
-0
gallery/lib/photoswipe/src/css/default-skin/default-skin.png
gallery/lib/photoswipe/src/css/default-skin/default-skin.png
+0
-0
gallery/lib/photoswipe/src/css/default-skin/default-skin.psd
gallery/lib/photoswipe/src/css/default-skin/default-skin.psd
+0
-0
gallery/lib/photoswipe/src/css/default-skin/default-skin.scss
...ery/lib/photoswipe/src/css/default-skin/default-skin.scss
+588
-0
gallery/lib/photoswipe/src/css/default-skin/default-skin.svg
gallery/lib/photoswipe/src/css/default-skin/default-skin.svg
+1
-0
gallery/lib/photoswipe/src/css/default-skin/preloader.gif
gallery/lib/photoswipe/src/css/default-skin/preloader.gif
+0
-0
gallery/lib/photoswipe/src/css/main.scss
gallery/lib/photoswipe/src/css/main.scss
+210
-0
gallery/lib/photoswipe/src/js/core.js
gallery/lib/photoswipe/src/js/core.js
+1043
-0
gallery/lib/photoswipe/src/js/desktop-zoom.js
gallery/lib/photoswipe/src/js/desktop-zoom.js
+170
-0
gallery/lib/photoswipe/src/js/framework-bridge.js
gallery/lib/photoswipe/src/js/framework-bridge.js
+277
-0
gallery/lib/photoswipe/src/js/gestures.js
gallery/lib/photoswipe/src/js/gestures.js
+1155
-0
gallery/lib/photoswipe/src/js/history.js
gallery/lib/photoswipe/src/js/history.js
+283
-0
gallery/lib/photoswipe/src/js/items-controller.js
gallery/lib/photoswipe/src/js/items-controller.js
+493
-0
gallery/lib/photoswipe/src/js/show-hide-transition.js
gallery/lib/photoswipe/src/js/show-hide-transition.js
+181
-0
gallery/lib/photoswipe/src/js/tap.js
gallery/lib/photoswipe/src/js/tap.js
+78
-0
gallery/lib/photoswipe/src/js/ui/photoswipe-ui-default.js
gallery/lib/photoswipe/src/js/ui/photoswipe-ui-default.js
+858
-0
gallery/lib/photoswipe/website/_includes/menu.html
gallery/lib/photoswipe/website/_includes/menu.html
+79
-0
gallery/lib/photoswipe/website/_layouts/default.html
gallery/lib/photoswipe/website/_layouts/default.html
+176
-0
gallery/lib/photoswipe/website/documentation/api.md
gallery/lib/photoswipe/website/documentation/api.md
+317
-0
gallery/lib/photoswipe/website/documentation/creating-custom-ui.md
...ib/photoswipe/website/documentation/creating-custom-ui.md
+1
-0
gallery/lib/photoswipe/website/documentation/custom-html-in-slides.md
...photoswipe/website/documentation/custom-html-in-slides.md
+79
-0
gallery/lib/photoswipe/website/documentation/faq.md
gallery/lib/photoswipe/website/documentation/faq.md
+257
-0
gallery/lib/photoswipe/website/documentation/getting-started.md
...y/lib/photoswipe/website/documentation/getting-started.md
+536
-0
gallery/lib/photoswipe/website/documentation/options.md
gallery/lib/photoswipe/website/documentation/options.md
+418
-0
gallery/lib/photoswipe/website/documentation/performance-tips.md
.../lib/photoswipe/website/documentation/performance-tips.md
+40
-0
gallery/lib/photoswipe/website/documentation/responsive-images.md
...lib/photoswipe/website/documentation/responsive-images.md
+140
-0
gallery/lib/photoswipe/website/documentation/seo.md
gallery/lib/photoswipe/website/documentation/seo.md
+127
-0
gallery/lib/photoswipe/website/documentation/updates.md
gallery/lib/photoswipe/website/documentation/updates.md
+45
-0
gallery/lib/photoswipe/website/index.html
gallery/lib/photoswipe/website/index.html
+870
-0
gallery/lib/photoswipe/website/site-assets/site.css
gallery/lib/photoswipe/website/site-assets/site.css
+955
-0
gallery/lib/photoswipe/website/test/apple-touch-icon-144x144.png
.../lib/photoswipe/website/test/apple-touch-icon-144x144.png
+0
-0
gallery/lib/photoswipe/website/test/fullscreen-laptop.jpg
gallery/lib/photoswipe/website/test/fullscreen-laptop.jpg
+0
-0
gallery/lib/photoswipe/website/test/grunt-logo.png
gallery/lib/photoswipe/website/test/grunt-logo.png
+0
-0
gallery/lib/photoswipe/website/test/high-dpi-icons.png
gallery/lib/photoswipe/website/test/high-dpi-icons.png
+0
-0
gallery/lib/photoswipe/website/test/history.png
gallery/lib/photoswipe/website/test/history.png
+0
-0
gallery/lib/photoswipe/website/test/horizontal-swipe.jpg
gallery/lib/photoswipe/website/test/horizontal-swipe.jpg
+0
-0
gallery/lib/photoswipe/website/test/keyboard.jpg
gallery/lib/photoswipe/website/test/keyboard.jpg
+0
-0
gallery/lib/photoswipe/website/test/lazy-loading.jpg
gallery/lib/photoswipe/website/test/lazy-loading.jpg
+0
-0
gallery/lib/photoswipe/website/test/lowres.jpg
gallery/lib/photoswipe/website/test/lowres.jpg
+0
-0
gallery/lib/photoswipe/website/test/luke45.png
gallery/lib/photoswipe/website/test/luke45.png
+0
-0
gallery/lib/photoswipe/website/test/pinch.jpg
gallery/lib/photoswipe/website/test/pinch.jpg
+0
-0
gallery/lib/photoswipe/website/test/progressive.jpg
gallery/lib/photoswipe/website/test/progressive.jpg
+0
-0
gallery/lib/photoswipe/website/test/share.png
gallery/lib/photoswipe/website/test/share.png
+0
-0
gallery/lib/photoswipe/website/test/spread.jpg
gallery/lib/photoswipe/website/test/spread.jpg
+0
-0
gallery/lib/photoswipe/website/test/twitter.svg
gallery/lib/photoswipe/website/test/twitter.svg
+1
-0
gallery/lib/photoswipe/website/test/vertical-swipe.jpg
gallery/lib/photoswipe/website/test/vertical-swipe.jpg
+0
-0
gallery/view/tpl/gallery.tpl
gallery/view/tpl/gallery.tpl
+122
-0
gnusoc/gnusoc.php
gnusoc/gnusoc.php
+9
-0
ldapauth/ldapauth.php
ldapauth/ldapauth.php
+40
-4
pubcrawl/Mod_Ap_probe.php
pubcrawl/Mod_Ap_probe.php
+1
-1
pubcrawl/activitypub.png
pubcrawl/activitypub.png
+0
-0
pubcrawl/as.php
pubcrawl/as.php
+56
-21
pubcrawl/pubcrawl.php
pubcrawl/pubcrawl.php
+37
-24
pubcrawl/pubcrawl.png
pubcrawl/pubcrawl.png
+0
-0
std_embeds/std_embeds.php
std_embeds/std_embeds.php
+6
-8
No files found.
cart/cart.apd
View file @
dec18d28
version: 1
url: $baseurl/cart
requires: local_channel
name: Cart
photo: $baseurl/addon/cart/view/img/cart.png
photo: icon:shopping-cart
categories: E-Commerce
cart/cart.php
View file @
dec18d28
This diff is collapsed.
Click to expand it.
cart/currencycodes.json
0 → 100644
View file @
dec18d28
This diff is collapsed.
Click to expand it.
cart/manual_payments.php
View file @
dec18d28
...
...
@@ -12,7 +12,7 @@ function cart_post_manual_checkout_confirm () {
cart_do_checkout
(
$order
);
cart_do_checkout_after
(
$order
);
//cart_do_fulfill ($order); //No auto fulfillment on manual payments.
//goaway(z_root() . '/cart/' . argv(1) . '/checkout/complete'
);
goaway
(
z_root
()
.
'/cart/'
.
argv
(
1
)
.
'/order/'
.
$orderhash
);
}
function
cart_checkout_complete
(
&
$hookdata
)
{
...
...
@@ -22,6 +22,7 @@ function cart_checkout_complete (&$hookdata) {
function
cart_checkout_manual
(
&
$hookdata
)
{
$page_uid
=
((
App
::
$profile_uid
)
?
App
::
$profile_uid
:
local_channel
());
$nick
=
App
::
$profile
[
'channel_address'
];
$manualpayments
=
get_pconfig
(
$page_uid
,
'cart'
,
'enable_manual_payments'
);
$manualpayments
=
isset
(
$manualpayments
)
?
$manualpayments
:
false
;
...
...
@@ -38,12 +39,15 @@ function cart_checkout_manual (&$hookdata) {
}
$order
=
cart_loadorder
(
$orderhash
);
call_hooks
(
'cart_calc_totals'
,
$order
);
$manualpayopts
=
get_pconfig
(
$page_uid
,
'cart'
,
'manual_payopts'
);
$manualpayopts
[
"order_hash"
]
=
$orderhash
;
$order
[
"payopts"
]
=
$manualpayopts
;
$order
[
"finishedtext"
]
=
t
(
"Finished"
);
$order
[
"finishedurl"
]
=
z_root
()
.
'/cart/'
.
$nick
;
$order
[
"links"
][
"checkoutlink"
]
=
z_root
()
.
'/cart/'
.
$nick
.
'/checkout/start?cart='
.
$order
[
"order_hash"
];
$template
=
get_markup_template
(
'basic_checkout_manual_confirm.tpl'
,
'addon/cart/'
);
call_hooks
(
"cart_display_before"
,
$order
);
$display
=
replace_macros
(
$template
,
$order
);
$hookdata
[
"checkoutdisplay"
]
=
$display
;
...
...
cart/myshop.php
View file @
dec18d28
...
...
@@ -5,6 +5,7 @@ function cart_myshop_load(){
Zotlabs\Extend\Hook
::
register
(
'cart_aside_filter'
,
'addon/cart/myshop.php'
,
'cart_myshop_aside'
,
1
,
99
);
Zotlabs\Extend\Hook
::
register
(
'cart_myshop_order'
,
'addon/cart/myshop.php'
,
'cart_myshop_order'
,
1
,
99
);
Zotlabs\Extend\Hook
::
register
(
'cart_post_myshop_item_fulfill'
,
'addon/cart/myshop.php'
,
'cart_myshop_item_fulfill'
,
1
,
99
);
Zotlabs\Extend\Hook
::
register
(
'cart_post_myshop_item_cancel'
,
'addon/cart/myshop.php'
,
'cart_myshop_item_cancel'
,
1
,
99
);
Zotlabs\Extend\Hook
::
register
(
'cart_post_myshop_clear_item_exception'
,
'addon/cart/myshop.php'
,
'cart_myshop_clear_item_exception'
,
1
,
99
);
Zotlabs\Extend\Hook
::
register
(
'cart_post_myshop_add_itemnote'
,
'addon/cart/myshop.php'
,
'cart_myshop_add_itemnote'
,
1
,
99
);
Zotlabs\Extend\Hook
::
register
(
'cart_post_myshop_add_ordernote'
,
'addon/cart/myshop.php'
,
'cart_myshop_add_ordernote'
,
1
,
99
);
...
...
@@ -12,14 +13,17 @@ function cart_myshop_load(){
Zotlabs\Extend\Hook
::
register
(
'cart_myshop_openorders'
,
'addon/cart/myshop.php'
,
'cart_myshop_openorders'
,
1
,
99
);
Zotlabs\Extend\Hook
::
register
(
'cart_myshop_closedorders'
,
'addon/cart/myshop.php'
,
'cart_myshop_closedorders'
,
1
,
99
);
Zotlabs\Extend\Hook
::
register
(
'cart_post_myshop_order_markpaid'
,
'addon/cart/myshop.php'
,
'cart_myshop_order_markpaid'
,
1
,
99
);
Zotlabs\Extend\Hook
::
register
(
'cart_orderpaid'
,
'addon/cart/myshop.php'
,
'cart_myshop_orderpaid_hook'
,
1
,
10000
);
Zotlabs\Extend\Hook
::
register
(
'cart_after_fulfill'
,
'addon/cart/cart.php'
,
'cart_myshop_itemfulfilled_hook'
,
1
,
30000
);
Zotlabs\Extend\Hook
::
register
(
'cart_after_cancel'
,
'addon/cart/cart.php'
,
'cart_myshop_cancelled_hook'
,
1
,
30000
);
}
function
cart_myshop_unload
(){
Zotlabs\Extend\Hook
::
unregister
(
'cart_main_myshop'
,
'addon/cart/myshop.php'
,
'cart_myshop_main'
);
Zotlabs\Extend\Hook
::
unregister
(
'cart_aside_filter'
,
'addon/cart/myshop.php'
,
'cart_myshop_aside'
);
Zotlabs\Extend\Hook
::
unregister
(
'cart_myshop_order'
,
'addon/cart/myshop.php'
,
'cart_myshop_order'
);
Zotlabs\Extend\Hook
::
unregister
(
'cart_post_myshop_item_fulfill'
,
'addon/cart/myshop.php'
,
'cart_myshop_item_fulfill'
);
Zotlabs\Extend\Hook
::
unregister
(
'cart_post_myshop_item_cancel'
,
'addon/cart/myshop.php'
,
'cart_myshop_item_cancel'
,
1
,
99
);
Zotlabs\Extend\Hook
::
unregister
(
'cart_post_myshop_clear_item_exception'
,
'addon/cart/myshop.php'
,
'cart_myshop_clear_item_exception'
);
Zotlabs\Extend\Hook
::
unregister
(
'cart_post_myshop_add_itemnote'
,
'addon/cart/myshop.php'
,
'cart_myshop_add_itemnote'
);
Zotlabs\Extend\Hook
::
unregister
(
'cart_post_myshop_add_ordernote'
,
'addon/cart/myshop.php'
,
'cart_myshop_add_ordernote'
);
...
...
@@ -27,43 +31,11 @@ function cart_myshop_unload(){
Zotlabs\Extend\Hook
::
unregister
(
'cart_myshop_openorders'
,
'addon/cart/myshop.php'
,
'cart_myshop_openorders'
);
Zotlabs\Extend\Hook
::
unregister
(
'cart_myshop_closedorders'
,
'addon/cart/myshop.php'
,
'cart_myshop_closedorders'
);
Zotlabs\Extend\Hook
::
unregister
(
'cart_post_myshop_order_markpaid'
,
'addon/cart/myshop.php'
,
'cart_myshop_order_markpaid'
);
Zotlabs\Extend\Hook
::
unregister
(
'cart_orderpaid'
,
'addon/cart/myshop.php'
,
'cart_myshop_orderpaid_hook'
,
1
,
10000
);
Zotlabs\Extend\Hook
::
unregister
(
'cart_after_fulfill'
,
'addon/cart/cart.php'
,
'cart_myshop_itemfulfilled_hook'
,
1
,
30000
);
Zotlabs\Extend\Hook
::
unregister
(
'cart_after_cancel'
,
'addon/cart/cart.php'
,
'cart_myshop_cancelled_hook'
,
1
,
30000
);
}
/* FUTURE/TODO
function cart_myshop_searchparams ($search) {
$keys = Array (
"order_hash"=>Array("key"=>"order_hash","cast"=>"'%s'","escfunc"=>"dbesc"),
"item_desc"=>Array("key"=>"item_desc","cast"=>"'%s'","escfunc"=>"dbesc"),
"item_type"=>Array("key"=>"item_type","cast"=>"'%s'","escfunc"=>"dbesc"),
"item_sku"=>Array("key"=>"item_sku","cast"=>"'%s'","escfunc"=>"dbesc"),
"item_qty"=>Array("key"=>"item_qty","cast"=>"%d","escfunc"=>"intval"),
"item_price"=>Array("key"=>"item_price","cast"=>"%f","escfunc"=>"floatval"),
"item_tax_rate"=>Array("key"=>"item_tax_rate","cast"=>"%f","escfunc"=>"floatval"),
"item_meta"=>Array("key"=>"item_meta","cast"=>"'%s'","escfunc"=>"dbesc"),
);
$colnames = '';
$valuecasts = '';
$params = Array();
$count=0;
foreach ($keys as $key=>$cast) {
if (isset($search[$key])) {
$colnames .= ($count > 0) ? "," : '';
$colnames .= $cast["key"];
$valuecasts .= ($count > 0) ? "," : '';
$valuecasts .= $cast["cast"];
$escfunc = $cast["escfunc"];
logger ("[cart] escfunc = ".$escfunc);
$params[] = $escfunc($item[$key]);
$count++;
}
}
}
*/
function
cart_myshop_main
(
&
$pagecontent
)
{
$sellernick
=
argv
(
1
);
...
...
@@ -105,15 +77,18 @@ function cart_myshop_main (&$pagecontent) {
function
cart_myshop_menu
()
{
$urlroot
=
'/'
.
argv
(
0
)
.
'/'
.
argv
(
1
)
.
'/myshop'
;
//$openorders=cart_myshop_get_openorders(null,10000,0);
$allorders
=
cart_myshop_get_allorders
(
null
,
10000
,
0
);
$openorders
=
cart_myshop_get_openorders
(
null
,
10000
,
0
);
$ordercount
=
cart_myshop_get_ordercount
();
//$allorders=cart_myshop_get_allorders(null,10000,0);
//$closedorders=cart_myshop_get_closedorders(null,10000,0);
$rendered
=
''
;
//$rendered .= "<a href='".$urlroot."/openorders'>Open Orders (".count($openorders).")</a><BR />";
//$rendered .= "<a href='".$urlroot."/closedorders'>Closed Orders (".count($closedorders).")</a><BR />";
$rendered
.
=
"<a href='"
.
$urlroot
.
"/allorders'>All Orders ("
.
count
(
$allorders
)
.
")</a><BR />"
;
$rendered
.
=
"<li><a class='nav-link' href='"
.
$urlroot
.
"'>Home</a></li>"
;
$rendered
.
=
"<li><a class='nav-link' href='/"
.
argv
(
0
)
.
"/"
.
argv
(
1
)
.
"/catalog'>Catalog</a></li>"
;
//$rendered .= "<li><a class='nav-link' href='".$urlroot."/openorders'>Open Orders (".count($openorders).")</a></li>";
//$rendered .= "<li><a class='nav-link' href='".$urlroot."/closedorders'>Closed Orders (".count($closedorders).")</a></li>";
$rendered
.
=
"<li><a class='nav-link' href='"
.
$urlroot
.
"/allorders'>All Orders ("
.
$ordercount
.
")</a></li>"
;
call_hooks
(
'cart_myshop_menufilter'
,
$rendered
);
return
$rendered
;
return
'<ul class="nav nav-pills flex-column">'
.
$rendered
.
'</ul>'
;
}
function
cart_myshop_openorders
(
&
$pagecontent
)
{
...
...
@@ -159,6 +134,8 @@ function cart_myshop_order(&$pagecontent) {
$templateinfo
=
array
(
'name'
=>
'myshop_order.tpl'
,
'path'
=>
'addon/cart/'
);
call_hooks
(
'cart_filter_myshop_order'
,
$templateinfo
);
$template
=
get_markup_template
(
$templateinfo
[
'name'
],
$templateinfo
[
'path'
]);
$templatevalues
[
'added_display'
]
=
Array
(
"order"
=>
$order
,
"content"
=>
""
);
call_hooks
(
'cart_addons_myshop_order_display'
,
$templatevalues
[
'added_display'
]);
//HOOK: cart_post_myshop_order
$rendered
=
replace_macros
(
$template
,
$templatevalues
);
$pagecontent
=
$rendered
;
...
...
@@ -189,10 +166,14 @@ function cart_myshop_order_markpaid () {
return
;
}
}
function
cart_myshop_orderpaid_hook
(
&
$hookdata
)
{
$orderhash
=
$hookdata
[
"order"
][
"order_hash"
];
$order_meta
=
cart_getorder_meta
(
$orderhash
);
$order_meta
[
"notes"
][]
=
date
(
"Y-m-d h:i:sa T - "
)
.
"Marked Paid"
;
cart_updateorder_meta
(
$order_meta
,
$orderhash
);
}
function
cart_myshop_item_fulfill
()
{
...
...
@@ -221,17 +202,59 @@ function cart_myshop_item_fulfill () {
}
$itemtofulfill
=
Array
(
'order_hash'
=>
$orderhash
,
'id'
=>
$itemid
);
cart_do_fulfillitem
(
$itemtofulfill
);
if
(
isset
(
$itemtofulfill
[
"error"
]))
{
notice
(
t
(
$itemtofulfill
[
"error"
]));
return
;
}
}
function
cart_myshop_item_cancel
()
{
notice
(
"Cancel Item"
.
EOL
);
if
(
!
check_form_security_token
())
{
notice
(
check_form_security_std_err_msg
());
return
;
}
$itemid
=
preg_replace
(
'/[^0-9]/'
,
''
,
$_POST
[
"itemid"
]);
$orderhash
=
argv
(
4
);
$orderhash
=
preg_replace
(
'/[^a-z0-9]/'
,
''
,
$orderhash
);
$order
=
cart_loadorder
(
$orderhash
);
$channel
=
\
App
::
get_channel
();
$channel_hash
=
$channel
[
"channel_hash"
];
if
(
!
$order
||
$order
[
"seller_channel"
]
!=
$channel_hash
)
{
notice
(
t
(
"Access Denied"
));
return
;
}
foreach
(
$order
[
"items"
]
as
$item
)
{
if
(
$item
[
"id"
]
==
$itemid
)
{
$itemtocancel
=
$itemid
;
}
}
if
(
!
$itemtocancel
)
{
notice
(
t
(
"Invalid Item"
));
return
;
}
$itemtocancel
=
Array
(
'order_hash'
=>
$orderhash
,
'id'
=>
$itemid
);
logger
(
"Call do_cancelitem"
,
LOGGER_DEBUG
);
cart_do_cancelitem
(
$itemtocancel
);
if
(
isset
(
$itemtocancel
[
"error"
]))
{
notice
(
t
(
$itemtocancel
[
"error"
]));
return
;
}
}
function
cart_myshop_itemfulfilled_hook
(
&
$hookdata
)
{
$orderhash
=
$hookdata
[
"item"
][
"order_hash"
];
$item_meta
=
cart_getitem_meta
(
$itemid
,
$orderhash
);
$item_meta
[
"notes"
][]
=
date
(
"Y-m-d h:i:sa T - "
)
.
"Manual Fulfillment"
;
cart_updateitem_meta
(
$itemid
,
$item_meta
,
$orderhash
);
}
function
cart_myshop_itemcancelled_hook
(
&
$hookdata
)
{
$orderhash
=
$hookdata
[
"item"
][
"order_hash"
];
$item_meta
=
cart_getitem_meta
(
$itemid
,
$orderhash
);
$item_meta
[
"notes"
][]
=
date
(
"Y-m-d h:i:sa T - "
)
.
"Manual Cancellation"
;
cart_updateitem_meta
(
$itemid
,
$item_meta
,
$orderhash
);
}
function
cart_myshop_clear_item_exception
()
{
...
...
@@ -261,7 +284,7 @@ function cart_myshop_clear_item_exception () {
return
;
}
$r
=
q
(
"update cart_orderitems set item_exception =
false
where order_hash = '%s' and id = %d"
,
$r
=
q
(
"update cart_orderitems set item_exception =
0
where order_hash = '%s' and id = %d"
,
dbesc
(
$orderhash
),
intval
(
$itemid
));
$item_meta
=
cart_getitem_meta
(
$itemid
,
$orderhash
);
...
...
@@ -322,7 +345,7 @@ function cart_myshop_add_itemnote () {
$item_meta
=
cart_getitem_meta
(
$itemid
,
$orderhash
);
$item_meta
[
"notes"
][]
=
date
(
"Y-m-d h:i:sa T - "
)
.
filter_var
(
$_POST
[
"notetext"
],
FILTER_SANITIZE_STRING
);
if
(
isset
(
$_POST
[
"exception"
]))
{
$r
=
q
(
"update cart_orderitems set item_exception =
true
where order_hash = '%s' and id = %d"
,
$r
=
q
(
"update cart_orderitems set item_exception =
1
where order_hash = '%s' and id = %d"
,
dbesc
(
$orderhash
),
intval
(
$itemid
));
$item_meta
[
"notes"
][]
=
date
(
"Y-m-d h:i:sa T - "
)
.
"Exception Set"
;
}
...
...
@@ -341,29 +364,44 @@ function cart_myshop_aside (&$aside) {
$rendered
=
''
;
$urlroot
=
'/'
.
argv
(
0
)
.
'/'
.
argv
(
1
)
.
'/myshop'
;
$rendered
.
=
"<li><a class='nav-link' href='"
.
$urlroot
.
"'>Home</a></li>"
;
$rendered
.
=
"<li><a class='nav-link' href='/"
.
argv
(
0
)
.
"/"
.
argv
(
1
)
.
"/catalog'>Catalog</a></li>"
;
//$openorders=cart_myshop_get_openorders(null,10000,0);
$allorders
=
cart_myshop_get_allorders
(
null
,
10000
,
0
);
//$allorders=cart_myshop_get_allorders(null,10000,0);
$ordercount
=
cart_myshop_get_ordercount
();
//$closedorders=cart_myshop_get_closedorders(null,10000,0);
//$rendered .= "<li><a href='".$urlroot."/openorders'>Open Orders (".count($openorders).")</a></li>";
//$rendered .= "<li><a href='".$urlroot."/closedorders'>Closed Orders (".count($closedorders).")</a></li>";
$rendered
.
=
"<li><a href='"
.
$urlroot
.
"/allorders'>All Orders ("
.
count
(
$allorders
)
.
")</a></li>"
;
//$rendered .= "<li><a class='nav-link' href='".$urlroot."/openorders'>Open Orders (".count($openorders).")</a></li>";
//$rendered .= "<li><a class='nav-link' href='".$urlroot."/closedorders'>Closed Orders (".count($closedorders).")</a></li>";
$rendered
.
=
"<li><a class='nav-link' href='"
.
$urlroot
.
"/allorders'>All Orders ("
.
$ordercount
.
")</a></li>"
;
call_hooks
(
'cart_myshop_menufilter'
,
$rendered
);
$templatevalues
[
"content"
]
=
$rendered
;
$template
=
get_markup_template
(
'myshop_aside.tpl'
,
'addon/cart/'
);
$rendered
=
replace_macros
(
$template
,
$templatevalues
);
$aside
=
$rendered
.
$aside
;
$aside
=
'<ul class="nav nav-pills flex-column">'
.
$rendered
.
'</ul>'
.
$aside
;
return
(
$aside
);
}
function
cart_myshop_get_ordercount
()
{
$seller_hash
=
get_observer_hash
();
$r
=
q
(
"select count(cart_orders.order_hash) as ordercount from cart_orders where
seller_channel = '%s'
"
,
dbesc
(
$seller_hash
));
if
(
!
$r
)
{
return
0
;}
return
$r
[
0
][
"ordercount"
];
}
function
cart_myshop_get_allorders
(
$search
=
null
,
$limit
=
100000
,
$offset
=
0
)
{
/**
* search = Array of search terms: //NOT YET IMPLEMENTED
* [""]
***/
$seller_hash
=
get_observer_hash
();
$r
=
q
(
"select distinct cart_orders.order_hash from cart_orders,cart_orderitems
$r
=
q
(
"select distinct cart_orders.order_hash
,cart_orders.id
from cart_orders,cart_orderitems
where cart_orders.order_hash = cart_orderitems.order_hash and
seller_channel = '%s'
ORDER BY cart_orders.id
limit %d offset %d"
,
dbesc
(
$seller_hash
),
intval
(
$limit
),
intval
(
$offset
));
...
...
@@ -381,6 +419,8 @@ function cart_myshop_get_openorders ($search=null,$limit=100,$offset=1) {
* [""]
***/
$seller_hash
=
get_observer_hash
();
/*
$r=q("select distinct cart_orders.order_hash from cart_orders,cart_orderitems
where cart_orders.order_hash = cart_orderitems.order_hash and
seller_channel = '%s' and cart_orderitems.item_fulfilled is NULL
...
...
@@ -388,7 +428,16 @@ function cart_myshop_get_openorders ($search=null,$limit=100,$offset=1) {
limit %d offset %d",
dbesc($seller_hash),
intval($limit), intval($offset));
*/
$r
=
q
(
"select distinct cart_orders.order_hash from cart_orders,cart_orderitems
where cart_orders.order_hash = cart_orderitems.order_hash and
seller_channel = '%s' and
cart_orderitems.item_fulfilled = 0 and
cart_orderitems.item_confirmed = 1
limit %d offset %d"
,
dbesc
(
$seller_hash
),
intval
(
$limit
),
intval
(
$offset
));
if
(
!
$r
)
{
return
Array
();}
$orders
=
Array
();
...
...
@@ -404,7 +453,7 @@ function cart_myshop_get_closedorders ($search=null,$limit=100,$offset=1) {
$r
=
q
(
"select distinct order_hash from cart_orders where
seller_channel = '%s' and
cart_orders.order_hash not in (select order_hash from cart_orderitems
where item_fulfilled
is not null
)
where item_fulfilled
= 1
)
limit %d offset %d"
,
dbesc
(
$seller_hash
),
intval
(
$limit
),
intval
(
$offset
));
...
...
cart/submodules/hzservices.php
0 → 100644
View file @
dec18d28
This diff is collapsed.
Click to expand it.
cart/submodules/paypalbutton.php
0 → 100644
View file @
dec18d28
This diff is collapsed.
Click to expand it.
cart/submodules/view/tpl/basic_checkout_ppbutton.tpl
0 → 100644
View file @
dec18d28
<script
src=
"https://www.paypalobjects.com/api/checkout.js"
></script>
{
{
include
file
=
"../../../view/tpl/basic_cart.tpl"
}
}
<div
class=
"section-content-wrapper"
>
{
{
if
!
$order.checkedout
}
}
<div
class=
"clearfix"
>
<div
id=
"paypal-button"
class=
"float-left mr-2"
></div>
<a
href=
"{
{
$links.checkoutlink
}
}"
class=
"float-left p-1"
>
Back to Payment Options
</a>
</div>
<script>
paypal
.
Button
.
render
({
env
:
'
{
{
$paypalenv
}
}
'
,
payment
:
function
(
data
,
actions
)
{
return
actions
.
request
.
post
(
'
{
{
$buttonhook
}
}_create
'
)
.
then
(
function
(
res
)
{
return
res
.
id
;
});
},
onAuthorize
:
function
(
data
,
actions
)
{
return
actions
.
request
.
post
(
'
{
{
$buttonhook
}
}_execute
'
,
{
paymentID
:
data
.
paymentID
,
payerID
:
data
.
payerID
}).
then
(
function
()
{
window
.
location
=
'{{$finishedurl}}'
;
}
);
}
},
'
#paypal-button
'
);
</script>
{
{
else
}
}
<h3>
This order has been confirmed and is awaiting payment.
</h3>
<h4><a
href=
"{
{
$finishedurl
}
}"
>
{
{
$finishedtext
}
}
</a></h4>
{
{/
if
}
}
</div>
</div>
cart/submodules/view/tpl/hzservices.itemadmin.skulist.tpl
0 → 100644
View file @
dec18d28
<form
id=
"cart-hzservices-itemadmin-form"
method=
"GET"
>
<div>
<ul>
{
{
foreach
$skus
as
$sku
}
}
<button
id=
"deactivatecommands-submit"
class=
"btn btn-primary"
type=
"submit"
name=
"SKU"
value=
"{
{
$sku.item_sku
}
}"
>
{
{
$sku.item_sku
}
}
</button>
- {
{
$sku.item_desc
}
}
<BR>
{
{/
foreach
}
}
</ul>
</div>
</form>
cart/submodules/view/tpl/hzservices.itemadmin.tpl
0 → 100644
View file @
dec18d28
<div
id=
"cart-hzservices-itemadmin-wrapper"
>
<h3>
Hubzilla Services Administration
</h3>
<div
id=
"cart-hzservices-itemadmin-form-wrapper"
>
<form
class=
"cart-hzservices-itemadmin-form"
method=
"get"
>
<input
type=
hidden
name=
"form_security_token"
value=
"{
{
$security_token
}
}"
>
{
{
$formelements
}
}
</form>
</div>
<div
id=
"cart-hzservices-itemadmin-skulist-wrapper"
>
{
{
$skulist
}
}
</div>
</div>
cart/submodules/view/tpl/hzservices.itemedit.tpl
0 → 100644
View file @
dec18d28
<div
id=
"cart-hzservices-edititem-wrapper"
>
<h3>
Edit Item: {
{
$sku
}
}
</h3>
<div
id=
"cart-hzservices-itemdetails-wrapper"
><div
class=
"panel panel-default"
>
<div
class=
"panel-heading"
><div
class=
"panel-title"
>
<h4><a
data-toggle=
"collapse"
data-parent=
"#cart-hzservices-itemedit-wrapper"
href=
"#itemdetails"
>
Item Details
</a></h4>
</div></div>
<div
id=
"itemdetails"
class=
"panel-collapse collapse in"
><div
id=
"cart-hzservices-edititem-form-wrapper"
>
<h1>
Item Details
</h1>
<form
id=
"cart-hzservices-edititem-form"
method=
"post"
action=
"{
{
$formelements.uri
}
}"
>
<input
type=
hidden
name=
"form_security_token"
value=
"{
{
$security_token
}
}"
>
<input
type=
hidden
name=
"cart_posthook"
value=
"hzservices_itemedit"
>
<input
type=
hidden
name=
"SKU"
value=
"{
{
$sku
}
}"
>
{
{
$formelements.itemdetails
}
}
{
{
$formelements.item
}
}
<button
id=
"itemdetails-submit"
class=
"btn btn-primary"
type=
"submit"
name=
"submit"
>
{
{
$formelements.submit
}
}
</button>
</form>
</div></div>
</div></div>
<div
id=
"cart-hzservices-itemactivatecommands-wrapper"
><div
class=
"panel panel-default"
>
<div
class=
"panel-heading"
><div
class=
"panel-title"
>
<h4><a
data-toggle=
"collapse"
data-parent=
"#cart-hzservices-itemedit-wrapper"
href=
"#activatecommands"
>
Activation Commands
</a></h4>
</div></div>
<div
id=
"activatecommands"
class=
"panel-collapse collapse"
><div
id=
"cart-hzservices-edititem-form-wrapper"
>
<h1>
Activation Commands
</h1>
<form
id=
"cart-hzservices-edititem-activation-form"
method=
"post"
action=
"{
{
$formelements.uri
}
}"
>
<input
type=
hidden
name=
"form_security_token"
value=
"{
{
$security_token
}
}"
>
<input
type=
hidden
name=
"cart_posthook"
value=
"hzservices_itemactivation"
>
<input
type=
hidden
name=
"SKU"
value=
"{
{
$sku
}
}"
>
{
{
$formelements.itemactivation
}
}
<button
id=
"activatecommands-submit"
class=
"btn btn-primary"
type=
"submit"
name=
"submit"
>
{
{
$formelements.submit
}
}
</button>
{
{
$formelements.activate_commands
}
}
</form>
</div></div>
</div></div>
<div
id=
"cart-hzservices-itemdeactivatecommands-wrapper"
><div
class=
"panel panel-default"
>
<div
class=
"panel-heading"
><div
class=
"panel-title"
>
<h4><a
data-toggle=
"collapse"
data-parent=
"#cart-hzservices-itemedit-wrapper"
href=
"#deactivatecommands"
>
Deactivation Commands
</a></h4>
</div></div>
<div
id=
"deactivatecommands"
class=
"panel-collapse collapse"
><div
id=
"cart-hzservices-edititem-form-wrapper"
>
<h1>
Deactivation Commands
</h1>
<form
id=
"cart-hzservices-edititem-deactivation-form"
method=
"post"
action=
"{
{
$formelements.uri
}
}"
>
<input
type=
hidden
name=
"form_security_token"
value=
"{
{
$security_token
}
}"
>
<input
type=
hidden
name=
"cart_posthook"
value=
"hzservices_itemdeactivation"
>
<input
type=
hidden
name=
"SKU"
value=
"{
{
$sku
}
}"
>
{
{
$formelements.itemdeactivation
}
}
<button
id=
"deactivatecommands-submit"
class=
"btn btn-primary"
type=
"submit"
name=
"submit"
>
{
{
$formelements.submit
}
}
</button>
{
{
$formelements.deactivate_commands
}
}
</form>
</div></div>
</div></div>
</div>
cart/submodules/view/tpl/ppbutton_txndetails.tpl
0 → 100644
View file @
dec18d28
<div>
<h3>
Paypal Transactions
</h3>
<ul>
{
{
foreach
$transactions
as
$transaction
}
}
<li><b>
{
{
$transaction.amount
}
} ({
{
$transaction.currency
}
})
</b>
| {
{
$transaction.intent
}
} - {
{
$transaction.state
}
} | {
{
$transaction.timestamp
}
} |
<i>
{
{
$transaction.payer
}
}
</i>
</li>
{
{/
foreach
}
}
</ul>
</div>
cart/view/tpl/basic_cart.tpl
View file @
dec18d28
<h1>
CART CONTENTS
</h1>
<div
class=
"generic-content-wrapper"
>
<div
class=
"section-title-wrapper"
>
<h2>
CART CONTENTS
</h2>
</div>
<div
class=
"section-subtitle-wrapper"
>
<h3>
{
{
if
$title
}
}{
{
$title
}
}{
{
else
}
}Order{
{/
if
}
}
</h3>
</div>
<div
class=
"section-content-wrapper"
>
<form
id=
"cart_form"
method=
"post"
>
<input
type=
"hidden"
name=
"cart_posthook"
value=
"update_item"
>
<table
class=
"w-100"
>
<tr>
<th
width=
10%
>
Qty
</th>
<th
width=
50%
>
Description
</th>
<th
width=
20%
style=
"text-align:right;"
>
Price each {
{
if
$currencysymbol
}
}({
{
$currencysymbol
}
}){
{/
if
}
}
</th>
<th
width=
20%
style=
"text-align:right;"
>
Extended
</th>
</tr>
{
{
foreach
$items
as
$item
}
}
<tr>
<td>
{
{
if
$order_checkedout
}
}
{
{
$item.item_qty
}
}
{
{
else
}
}
<input
class=
"form-control form-control-sm"
type=
"text"
name=
"qty-{
{
$item.id
}
}"
value=
"{
{
$item.item_qty
}
}"
style=
"min-width: 4em;"
>
{
{/
if
}
}
</td>
<td>
{
{
$item.item_desc
}
}
</td>
<td
style=
"text-align:right;"
>
{
{
$item.item_price
}
}
</td>
<td
style=
"text-align:right;"
>
{
{
$item.extended
}
}
</td>
</tr>
{
{/
foreach
}
}
<tr>
<td
colspan=
4
>
{
{
if
!
$order_checkedout
}
}
<button
id=
"cart_update"
class=
"btn btn-success btn-sm invisible"
type=
"submit"
name=
"Submit"
title=
"Update Cart"
><i
class=
"fa fa-check"
></i>
Save Changes
</button>
{
{/
if
}
}
</td>
</tr>
<div
class=
"dm42cart catalog"
style=
"width:100%;"
>
<div
class=
'section-title-wrapper'
>
<div
class=
"title"
>
{
{
if
$title
}
}{
{
$title
}
}{
{
else
}
}Order{
{/
if
}
}
</div>
</div>
<div
class=
'section-content-wrapper'
style=
"width:100%;"
>
<table
style=
"width:100%;"
>
<tr>
<th
width=
60%
>
Description
</th>
<th
width=
20%
style=
"text-align:right;"
>
Price each {
{
if
$currencysymbol
}
}({
{
$currencysymbol
}
}){
{/
if
}
}
</th>
<th
width=
20%
style=
"text-align:right;"
>
Extended
</th>
</tr>
{
{
foreach
$items
as
$item
}
}
<tr>
<td>
{
{
$item.item_desc
}
}
</td>
<td
style=
"text-align:right;"
>
{
{
$item.item_price
}
}
</td>
<td
style=
"text-align:right;"
>
{
{
$item.extended
}
}
</td>
</tr>
{
{/
foreach
}
}
<tr>
<td></td>
<th
style=
"text-align:right;"
>
Subtotal
</th>
<td
style=
"text-align:right;"
>
{
{
$totals.Subtotal
}
}
</td>
</tr>
<tr>
<td></td>
<th
style=
"text-align:right;"
>
Tax Total
</th>
<td
style=
"text-align:right;"
>
{
{
$totals.Tax
}
}
</td>
</tr>
<tr>
<td></td>
<th
style=
"text-align:right;"
>
Order Total
</th>
<td
style=
"text-align:right;"
>
{
{
$totals.OrderTotal
}
}
</td>
</tr>
{
{
if
$totals.Payment
}
}
<tr>
<td></td>
<th>
Payment
</th>
<td
style=
"text-align:right;"
>
{
{
$totals.Payment
}
}
</td>
</tr>
{
{/
if
}
}
</table>
</div>
</div>
<tr>
<td></td><td></td>
<th
style=
"text-align:right;"
>
Subtotal
</th>
<td
style=
"text-align:right;"
>
{
{
$totals.Subtotal
}
}
</td>
</tr>
<tr>
<td></td><td></td>
<th
style=
"text-align:right;"
>
Tax Total
</th>
<td
style=
"text-align:right;"
>
{
{
$totals.Tax
}
}
</td>
</tr>
<tr>
<td></td><td></td>
<th
style=
"text-align:right;"
>
Order Total
</th>
<td
style=
"text-align:right;"
>
{
{
$totals.OrderTotal
}
}
</td>
</tr>
{
{
if
$totals.Payment
}
}
<tr>
<td></td>
<th>
Payment
</th>
<td
style=
"text-align:right;"
>
{
{
$totals.Payment
}
}
</td>
</tr>
{
{/
if
}
}
</table>
</form>
<script>
$
(
'
#cart_form
'
).
areYouSure
(
{
'addRemoveFieldsMarksDirty'
:
true
,
'message'
:
aStr
[
'leavethispage'
]
}
);
$
(
'
#cart_form
'
).
on
(
'
dirty.areYouSure
'
,
function
()
{
$
(
'
#cart_update
'
).
removeClass
(
'
invisible
'
);
});
</script>
</div>
<!-- basic_checkout_*.tpl -->
cart/view/tpl/basic_catalog.tpl
View file @
dec18d28
<div
class=
"dm42cart catalog"
>
<div
class=
'section-title-wrapper'
>
<div
class=
"title"
>
{
{
if
$title
}
}{
{
$title
}
}{
{
else
}
}Catalog{
{/
if
}
}
</div>
</div>
<div
class=
'section-content-wrapper'
>
<form
method=
"post"
>
<input
type=
"hidden"
name=
"cart_posthook"
value=
"add_item"
>
<table>
<tr>
<th></th>
<th>
Description
</th>
<th>
Price each {
{
if
$currencysymbol
}
}({
{
$currencysymbol
}
}){
{/
if
}
}
</th>
</tr>
{
{
foreach
$items
as
$item
}
}
<tr>
<td><button
class=
"btn btn-primary"
type=
"submit"
name=
"add"
id=
"newchannel-submit-button"
value=
"{
{
$item.item_sku
}
}"
>
Add
</button></td>
<td>
{
{
$item.item_desc
}
}
</td>
<td>
{
{
$item.item_price
}
}
</td>
</tr>
{
{/
foreach
}
}
</table>