Cheetah
ChPmtTemplate.php
Go to the documentation of this file.
1 <?php
2 
8 ch_import('ChWsbPaginate');
9 ch_import('ChWsbModuleTemplate');
10 ch_import('ChTemplFormView');
11 ch_import('ChTemplSearchResult');
12 
14 {
16 
20  function __construct(&$oConfig, &$oDb)
21  {
22  parent::__construct($oConfig, $oDb);
23 
24  $this->_sLangsPrefix = $this->_oConfig->getLangsPrefix();
25  }
26  function loadTemplates()
27  {
28  parent::loadTemplates();
29 
30  $this->_aTemplates['script'] = '<script language="javascript" type="text/javascript">__content__</script>';
31  $this->_aTemplates['on_result'] = '<script language="javascript" type="text/javascript">alert(\'__message__\')</script>';
32  $this->_aTemplates['on_result_inline'] = '<script language="javascript" type="text/javascript">parent.__js_object__.showResultInline(__params__);</script>';
33  }
34  function displayMoreWindow()
35  {
36  $sContent = $this->parseHtmlByName('more.html', array());
37  return PopupBox('pmt-orders-more', _t($this->_sLangsPrefix . 'wcpt_order_info'), $sContent);
38  }
39  function displayItems($aItemsInfo)
40  {
41  $aItems = array();
42  foreach($aItemsInfo as $aItem) {
43  $aItems[] = array(
44  'id' => $aItem['id'],
45  'price' => $aItem['price'],
46  'ch_if:link' => array(
47  'condition' => !empty($aItem['url']),
48  'content' => array(
49  'url' => $aItem['url'],
50  'title' => $aItem['title']
51  )
52  ),
53  'ch_if:text' => array(
54  'condition' => empty($aItem['url']),
55  'content' => array(
56  'title' => $aItem['title']
57  )
58  ),
59  );
60  }
61 
62  return $this->parseHtmlByName('items.html', array('ch_repeat:items' => $aItems));
63  }
65  {
67  $sContent = $this->parseHtmlByName('manual_order_form.html', array(
68  'form' => $oForm->getCode(),
69  'loading' => LoadingBox('pmt-order-manual-loading')
70  ));
71 
72  return PopupBox('pmt-manual-order', _t($this->_sLangsPrefix . 'wcpt_manual_order'), $sContent);
73  }
75  {
76  $sMethodName = 'get' . ucfirst($sType);
77  $aOrder = $this->_oDb->$sMethodName(array('type' => 'id', 'id' => $iId));
78  $aSeller = $this->_oDb->getVendorInfoProfile((int)$aOrder['seller_id']);
79 
80  $aResult = array(
81  'txt_client' => _t($this->_sLangsPrefix . 'txt_client'),
82  'txt_seller' => _t($this->_sLangsPrefix . 'txt_seller'),
83  'txt_order' => _t($this->_sLangsPrefix . 'txt_order'),
84  'txt_processed_with' => _t($this->_sLangsPrefix . 'txt_processed_with'),
85  'txt_message' => _t($this->_sLangsPrefix . 'txt_message'),
86  'txt_date' => _t($this->_sLangsPrefix . 'txt_date'),
87  'txt_products' => _t($this->_sLangsPrefix . 'txt_products'),
88  'client_name' => getNickName($aOrder['client_id']),
89  'client_url' => getProfileLink($aOrder['client_id']),
90  'ch_if:show_link' => array(
91  'condition' => !empty($aSeller['profile_url']),
92  'content' => array(
93  'seller_name' => $aSeller['profile_name'],
94  'seller_url' => $aSeller['profile_url'],
95  )
96  ),
97  'ch_if:show_text' => array(
98  'condition' => empty($aSeller['profile_url']),
99  'content' => array(
100  'seller_name' => $aSeller['profile_name']
101  )
102  ),
103  'order' => $aOrder['order'],
104  'provider' => $aOrder['provider'],
105  'error' => $aOrder['error_msg'],
106  'date' => $aOrder['date_uf'],
107  'ch_repeat:items' => array()
108  );
109 
111  $aItems = ChPmtCart::items2array($aOrder['items']);
112  else
113  $aItems = ChPmtCart::items2array($aOrder['seller_id'] . '_' . $aOrder['module_id'] . '_' . $aOrder['item_id'] . '_' . $aOrder['item_count']);
114 
115  foreach($aItems as $aItem) {
116  $aInfo = ChWsbService::call((int)$aItem['module_id'], 'get_cart_item', array($aOrder['client_id'], $aItem['item_id']));
117  if(!empty($aInfo) && is_array($aInfo))
118  $aResult['ch_repeat:items'][] = array(
119  'ch_if:link' => array(
120  'condition' => !empty($aInfo['url']),
121  'content' => array(
122  'title' => $aInfo['title'],
123  'url' => $aInfo['url']
124  )
125  ),
126  'ch_if:text' => array(
127  'condition' => empty($aInfo['url']),
128  'content' => array(
129  'title' => $aInfo['title'],
130  )
131  ),
132  'quantity' => $aItem['item_count'],
133  'price' => $aInfo['price'],
134  'currency_code' => $aSeller['currency_code']
135  );
136  }
137 
138  return $this->parseHtmlByName($sType . '_order.html', $aResult);
139  }
140  function displayOrders($sType, $aParams)
141  {
142  if(empty($aParams['per_page']))
143  $aParams['per_page'] = $this->_oConfig->getPerPage('orders');
144  $sJsObject = $this->_oConfig->getJsObject('orders');
145 
146  $sMethodNameInfo = 'get' . ucfirst($sType) . 'Orders';
147  $aOrders = $this->_oDb->$sMethodNameInfo($aParams);
148  if(empty($aOrders))
149  return MsgBox(_t($this->_sLangsPrefix . 'msg_no_results'));
150 
151  $aAdministrator = $this->_oDb->getVendorInfoProfile(CH_PMT_ADMINISTRATOR_ID);
152 
153  $sTxtMoreProducts = _t($this->_sLangsPrefix . 'txt_more_products');
154  $sTxtMoreItems = _t($this->_sLangsPrefix . 'txt_more_items');
155  $sTxtActionMore = _t($this->_sLangsPrefix . 'txt_action_more');
156 
157  //--- Get Orders ---//
158  $aResultOrders = array();
159  foreach($aOrders as $aOrder) {
160  if(empty($aOrder['user_id'])) {
161  $aOrder['user_name'] = $aAdministrator['profile_name'];
162  $aOrder['user_url'] = $aAdministrator['profile_url'];
163  }
164  else {
165  $aOrder['user_name'] = getNickName($aOrder['user_id']);
166  $aOrder['user_url'] = getProfileLink($aOrder['user_id']);
167  if(!$aOrder['user_name']) {
168  $aOrder['user_name'] = _t('_undefined');
169  $aOrder['user_url'] = '';
170  }
171  }
172 
173  $aResultOrders[] = array_merge($aOrder, array(
174  'js_object' => $sJsObject,
175  'type' => $sType,
176  'txt_more_products' => $sTxtMoreProducts,
177  'txt_more_items' => $sTxtMoreItems,
178  'txt_action_more' => $sTxtActionMore,
179  'ch_if:show_link' => array(
180  'condition' => !empty($aOrder['user_url']),
181  'content' => array(
182  'user_name' => $aOrder['user_name'],
183  'user_url' => $aOrder['user_url']
184  )
185  ),
186  'ch_if:show_text' => array(
187  'condition' => empty($aOrder['user_url']),
188  'content' => array(
189  'user_name' => $aOrder['user_name']
190  )
191  ),
192  'ch_if:pending' => array(
193  'condition' => $sType == CH_PMT_ORDERS_TYPE_PENDING,
194  'content' => array(
195  'id' => $aOrder['id'],
196  'order' => $aOrder['order']
197  )
198  ),
199  'ch_if:processed' => array(
201  'content' => array(
202  'order' => $aOrder['order']
203  )
204  ),
205  'products' => $aOrder['products'],
206  'items' => $aOrder['items'],
207  'subscription' => $this->_isSubscription($aOrder)
208  ));
209  }
210 
211  //--- Get Paginate Panel ---//
212  $sPaginatePanel = "";
213  $sMethodNameCount = 'get' . ucfirst($sType) . 'OrdersCount';
214  if(($iCount = $this->_oDb->$sMethodNameCount($aParams)) > $aParams['per_page']) {
215  $oPaginate = new ChWsbPaginate(array(
216  'start' => $aParams['start'],
217  'count' => $iCount,
218  'per_page' => $aParams['per_page'],
219  'per_page_step' => 2,
220  'per_page_interval' => 3,
221  'page_url' => CH_WSB_URL_ROOT . $this->_oConfig->getBaseUri() . ($sType == CH_PMT_ORDERS_TYPE_HISTORY ? 'history' : 'orders') . '/',
222  'on_change_page' => $sJsObject . ".changePage('" . $sType . "', {start}, {per_page}, " . $aParams['seller_id'] . ")"
223  ));
224  $sPaginatePanel = $oPaginate->getPaginate();
225  }
226 
227  return $this->parseHtmlByName($sType . '_orders.html', array(
228  'ch_repeat:orders' => $aResultOrders,
229  'paginate_panel' => $sPaginatePanel
230  ));
231  }
232  function displayOrdersBlock($sType, $iVendorId)
233  {
234  $sJsObject = $this->_oConfig->getJsObject('orders');
235 
236  //--- Get Filter Panel ---//
237  $sFilterPanel = ChTemplSearchResult::showAdminFilterPanel('', 'pmt-filter-text-' . $sType, 'pmt-filter-enable-' . $sType, 'filter', $sJsObject . ".applyFilter('" . $sType . "', this)");
238 
239  //--- Get Control Panel ---//
240  $aButtons = array();
242  $aButtons['pmt-process'] = _t($this->_sLangsPrefix . 'btn_process');
243  $aButtons['pmt-cancel'] = _t($this->_sLangsPrefix . 'btn_cancel');
244  $aButtons['pmt-report'] = _t($this->_sLangsPrefix . 'btn_report');
246  $aButtons['pmt-manual'] = array('type' => 'button', 'name' => 'pmt-manual', 'value' => _t($this->_sLangsPrefix . 'btn_manual_order'), 'onclick' => 'onclick="javascript:' . $sJsObject . '.addManually(this);"');
247 
248  $sControlPanel = ChTemplSearchResult::showAdminActionsPanel('pmt-form-' . $sType, $aButtons, 'orders');
249 
250  return $this->parseHtmlByName($sType . '_orders_block.html', array(
251  'txt_date' => _t($this->_sLangsPrefix . 'txt_date'),
252  'txt_client' => _t($this->_sLangsPrefix . 'txt_client'),
253  'txt_order' => _t($this->_sLangsPrefix . 'txt_order'),
254  'txt_amount' => _t($this->_sLangsPrefix . 'txt_amount'),
255  'txt_license' => _t($this->_sLangsPrefix . 'txt_license'),
256  'txt_action' => _t($this->_sLangsPrefix . 'txt_action'),
257  'type' => $sType,
258  'action' => CH_WSB_URL_ROOT . $this->_oConfig->getBaseUri() . 'act_orders_submit/' . $sType,
259  'orders' => $this->displayOrders($sType, array('seller_id' => $iVendorId, 'start' => 0)),
260  'filter_panel' => $sFilterPanel,
261  'control_panel' => $sControlPanel,
262  'loading' => LoadingBox('pmt-orders-' . $sType . '-loading')
263  ));
264  }
265  function displayHistoryBlock($iUserId, $iVendorId)
266  {
267  $sJsObject = $this->_oConfig->getJsObject('orders');
268 
269  //--- Get Filter Panel ---//
270  $sFilterPanel = ChTemplSearchResult::showAdminFilterPanel('', 'pmt-filter-text-history', 'pmt-filter-enable-history', 'filter', $sJsObject . ".applyFilter('history', this)");
271 
272  return $this->parseHtmlByName('history_orders_block.html', array(
273  'txt_date' => _t($this->_sLangsPrefix . 'txt_date'),
274  'txt_seller' => _t($this->_sLangsPrefix . 'txt_seller'),
275  'txt_order' => _t($this->_sLangsPrefix . 'txt_order'),
276  'txt_amount' => _t($this->_sLangsPrefix . 'txt_amount'),
277  'txt_license' => _t($this->_sLangsPrefix . 'txt_license'),
278  'txt_action' => _t($this->_sLangsPrefix . 'txt_action'),
279  'orders' => $this->displayOrders('history', array('user_id' => $iUserId, 'seller_id' => $iVendorId, 'start' => 0)),
280  'filter_panel' => $sFilterPanel,
281  'loading' => LoadingBox('pmt-orders-history-loading')
282  ));
283  }
285  {
286  $aCarts = array();
287  foreach($aInfo as $iVendorId => $aVendorCart) {
288  //--- Get Items ---//
289  $aItems = array();
290  foreach($aVendorCart['items'] as $aItem)
291  $aItems[] = array(
292  'vendor_id' => $aVendorCart['vendor_id'],
293  'vendor_currency_code' => $aVendorCart['vendor_currency_code'],
294  'item_id' => $aItem['id'],
295  'item_title' => $aItem['title'],
296  'item_url' => $aItem['url'],
297  'item_quantity' => $aItem['quantity'],
298  'item_price' => $aItem['quantity'] * $aItem['price'],
299  );
300 
301  //--- Get General Info ---//
302  $aCarts[] = array(
303  'vendor_id' => $aVendorCart['vendor_id'],
304  'ch_if:show_link' => array(
305  'condition' => !empty($aVendorCart['vendor_profile_url']),
306  'content' => array(
307  'vendor_username' => $aVendorCart['vendor_profile_name'],
308  'vendor_url' => $aVendorCart['vendor_profile_url'],
309  'vendor_currency_code' => $aVendorCart['vendor_currency_code'],
310  'items_count' => $aVendorCart['items_count'],
311  'items_price' => $aVendorCart['items_price']
312  )
313  ),
314  'ch_if:show_text' => array(
315  'condition' => empty($aVendorCart['vendor_profile_url']),
316  'content' => array(
317  'vendor_username' => $aVendorCart['vendor_profile_name'],
318  'vendor_currency_code' => $aVendorCart['vendor_currency_code'],
319  'items_count' => $aVendorCart['items_count'],
320  'items_price' => $aVendorCart['items_price']
321  )
322  ),
323  'vendor_icon' => $aVendorCart['vendor_profile_icon'],
324  'ch_repeat:items' => $aItems
325  );
326  }
327  return $this->addCss('toolbar.css', true) . $this->parseHtmlByName('toolbar_submenu.html', array('ch_repeat:carts' => $aCarts));
328  }
329  function displayCartContent($aCartInfo, $iVendorId = CH_PMT_EMPTY_ID)
330  {
331  $iAdminId = $this->_oConfig->getAdminId();
332  $sJsObject = $this->_oConfig->getJsObject('cart');
333 
334  if($iVendorId != CH_PMT_EMPTY_ID)
335  $aCartInfo = array($aCartInfo);
336 
337  $aVendors = array();
338  foreach($aCartInfo as $aVendor) {
339  //--- Get Providers ---//
340  $aProviders = array();
341  $aVendorProviders = $this->_oDb->getVendorInfoProviders($aVendor['vendor_id']);
342  foreach($aVendorProviders as $aProvider)
343  $aProviders[] = array(
344  'name' => $aProvider['name'],
345  'caption' => _t($this->_sLangsPrefix . 'txt_cart_' . $aProvider['name']),
346  'checked' => empty($aProviders) ? 'checked="checked"' : ''
347  );
348 
349  //--- Get Items ---//
350  $aItems = array();
351  foreach($aVendor['items'] as $aItem)
352  $aItems[] = array(
353  'vendor_id' => $aVendor['vendor_id'],
354  'vendor_currency_code' => $aVendor['vendor_currency_code'],
355  'module_id' => $aItem['module_id'],
356  'item_id' => $aItem['id'],
357  'item_title' => $aItem['title'],
358  'item_url' => $aItem['url'],
359  'item_quantity' => $aItem['quantity'],
360  'ch_if:show_price_paid' => array(
361  'condition' => (float)$aItem['price'] != 0,
362  'content' => array(
363  'item_price' => $aItem['quantity'] * $aItem['price'],
364  'vendor_currency_code' => $aVendor['vendor_currency_code'],
365  )
366  ),
367  'ch_if:show_price_free' => array(
368  'condition' => (int)$aItem['price'] == 0,
369  'content' => array()
370  ),
371  'js_object' => $sJsObject
372  );
373 
374  //--- Get Control Panel ---//
375  $aButtons = array(
376  'pmt-checkout' => _t($this->_sLangsPrefix . 'btn_checkout'),
377  'pmt-delete' => _t($this->_sLangsPrefix . 'btn_delete')
378  );
379  $sControlPanel = ChTemplSearchResult::showAdminActionsPanel('items_from_' . $aVendor['vendor_id'], $aButtons, 'items', true, true);
380 
381  //--- Get General ---//
382  $aVendors[] = array(
383  'vendor_id' => $aVendor['vendor_id'],
384  'ch_if:show_link' => array(
385  'condition' => !empty($aVendor['vendor_profile_url']),
386  'content' => array(
387  'txt_shopping_cart' => _t($this->_sLangsPrefix . 'txt_shopping_cart', $this->parseHtmlByName('vendor_link.html', array(
388  'vendor_username' => $aVendor['vendor_profile_name'],
389  'vendor_url' => $aVendor['vendor_profile_url'],
390  ))),
391  'txt_shopping_cart_summary' => _t('_payment_txt_shopping_cart_summary', $aVendor['items_count'], $aVendor['items_price'], $aVendor['vendor_currency_code']),
392  'vendor_currency_code' => $aVendor['vendor_currency_code'],
393  'items_count' => $aVendor['items_count'],
394  'items_price' => $aVendor['items_price']
395  )
396  ),
397  'ch_if:show_text' => array(
398  'condition' => empty($aVendor['vendor_profile_url']),
399  'content' => array(
400  'txt_shopping_cart' => _t($this->_sLangsPrefix . 'txt_shopping_cart', $aVendor['vendor_profile_name']),
401  'txt_shopping_cart_summary' => _t('_payment_txt_shopping_cart_summary', $aVendor['items_count'], $aVendor['items_price'], $aVendor['vendor_currency_code']),
402  'vendor_currency_code' => $aVendor['vendor_currency_code'],
403  'items_count' => $aVendor['items_count'],
404  'items_price' => $aVendor['items_price']
405  )
406  ),
407  'vendor_icon' => $aVendor['vendor_profile_icon'],
408  'ch_repeat:providers' => $aProviders,
409  'ch_repeat:items' => $aItems,
410  'js_object' => $sJsObject,
411  'process_url' => CH_WSB_URL_ROOT . $this->_oConfig->getBaseUri() . 'act_cart_submit/',
412  'control_panel' => $sControlPanel
413  );
414  }
415 
416  $this->addCss('cart.css');
417  $this->addJs('cart.js');
418  return $this->parseHtmlByName('cart.html', array_merge($this->_getJsContentCart(), array('ch_repeat:vendors' => $aVendors)));
419  }
420  function displayCartJs($bWrapped = true)
421  {
422  $this->addJs('cart.js');
423 
424  $aJs = $this->_getJsContentCart($bWrapped);
425  return $aJs['js_content'];
426  }
427  function displayAddToCartJs($iVendorId, $iModuleId, $iItemId, $iItemCount, $bNeedRedirect = false, $bWrapped = true)
428  {
429  $aJs = $this->_getJsContentCart();
430 
431  $sJsCode = $this->displayCartJs($bWrapped);
432  $sJsMethod = $this->parseHtmlByName('add_to_cart_js.html', array(
433  'js_object' => $aJs['js_object'],
434  'vendor_id' => $iVendorId,
435  'module_id' => $iModuleId,
436  'item_id' => $iItemId,
437  'item_count' => $iItemCount,
438  'need_redirect' => (int)$bNeedRedirect
439  ));
440 
441  return array($sJsCode, $sJsMethod);
442  }
443  function displayAddToCartLink($iVendorId, $iModuleId, $iItemId, $iItemCount, $bNeedRedirect = false)
444  {
445  $this->addJs('cart.js');
446  return $this->parseHtmlByName('add_to_cart.html', array_merge($this->_getJsContentCart(), array(
447  'txt_add_to_cart' => _t($this->_sLangsPrefix . 'txt_add_to_cart'),
448  'vendor_id' => $iVendorId,
449  'module_id' => $iModuleId,
450  'item_id' => $iItemId,
451  'item_count' => $iItemCount,
452  'need_redirect' => (int)$bNeedRedirect
453  )));
454  }
455 
456  function getPageCode(&$aParams)
457  {
458  global $_page;
460 
461  $iIndex = isset($aParams['index']) ? (int)$aParams['index'] : 0;
462  $_page['name_index'] = $iIndex;
463  $_page['js_name'] = isset($aParams['js']) ? $aParams['js'] : '';
464  $_page['css_name'] = isset($aParams['css']) ? $aParams['css'] : '';
465  $_page['extra_js'] = isset($aParams['extra_js']) ? $aParams['extra_js'] : '';
466 
467  check_logged();
468 
469  if(isset($aParams['content']))
470  foreach($aParams['content'] as $sKey => $sValue)
471  $_page_cont[$iIndex][$sKey] = $sValue;
472 
473  if(isset($aParams['title']['page']))
474  $this->setPageTitle($aParams['title']['page']);
475  if(isset($aParams['title']['block']))
476  $this->setPageMainBoxTitle($aParams['title']['block']);
477 
478  if(isset($aParams['breadcrumb']))
479  $GLOBALS['oTopMenu']->setCustomBreadcrumbs($aParams['breadcrumb']);
480 
481  PageCode($this);
482  }
483 
485  {
486  $aParams = array(
487  'title' => array(
488  'page' => _t($this->_sLangsPrefix . 'pcpt_response')
489  ),
490  'content' => array(
491  'page_main_code' => MsgBox(_t($sMessage))
492  )
493  );
494  $this->getPageCode($aParams);
495  }
496 
497  function getPageCodeError($sMessage, $bWrap = true)
498  {
499  $aParams = array(
500  'title' => array(
501  'page' => _t($this->_sLangsPrefix . 'pcpt_error')
502  ),
503  'content' => array(
504  'page_main_code' => $bWrap ? MsgBox(_t($sMessage)) : $sMessage
505  )
506  );
507  $this->getPageCode($aParams);
508  }
509 
510  function getPageCodeAdmin(&$aParams)
511  {
512  global $_page;
514 
515  $iIndex = isset($aParams['index']) ? (int)$aParams['index'] : 9;
516  $_page['name_index'] = $iIndex;
517  $_page['js_name'] = isset($aParams['js']) ? $aParams['js'] : '';
518  $_page['css_name'] = isset($aParams['css']) ? $aParams['css'] : '';
519  $_page['header'] = isset($aParams['title']['page']) ? $aParams['title']['page'] : '';
520 
521  if(isset($aParams['content']))
522  foreach($aParams['content'] as $sKey => $sValue)
523  $_page_cont[$iIndex][$sKey] = $sValue;
524 
525  PageCodeAdmin();
526  }
527 
528  function _getJsContentCart($bWrapped = true)
529  {
530  $sJsClass = $this->_oConfig->getJsClass('cart');
531  $sJsObject = $this->_oConfig->getJsObject('cart');
532 
533  $aOptions = array(
534  'sActionUrl' => CH_WSB_URL_ROOT . $this->_oConfig->getBaseUri(),
535  'sObjName' => $sJsObject,
536  'sAnimationEffect' => $this->_oConfig->getAnimationEffect(),
537  'iAnimationSpeed' => $this->_oConfig->getAnimationSpeed()
538  );
539 
540  $sJsContent = 'var ' . $sJsObject . ' = new ' . $sJsClass . '(' . json_encode($aOptions) . ');';
541  if($bWrapped)
542  $sJsContent = $this->_wrapInTagJsCode($sJsContent);
543 
544  return array('js_object' => $sJsObject, 'js_content' => $sJsContent);
545  }
546 
547  function _isSubscription($aOrder)
548  {
549  return '';
550  }
551 
552 }
CH_PMT_ADMINISTRATOR_ID
const CH_PMT_ADMINISTRATOR_ID
Definition: ChPmtModule.php:17
$sMessage
$sMessage
Definition: actions.inc.php:17
ChTemplFormView
Definition: ChTemplFormView.php:11
ChPmtTemplate\_getJsContentCart
_getJsContentCart($bWrapped=true)
Definition: ChPmtTemplate.php:528
CH_PMT_ORDERS_TYPE_PROCESSED
const CH_PMT_ORDERS_TYPE_PROCESSED
Definition: ChPmtModule.php:12
LoadingBox
LoadingBox($sName)
Definition: design.inc.php:185
MsgBox
MsgBox($sText, $iTimer=0)
Definition: design.inc.php:175
check_logged
check_logged()
Definition: admin.inc.php:238
ChPmtTemplate\displayItems
displayItems($aItemsInfo)
Definition: ChPmtTemplate.php:39
ChPmtTemplate\_isSubscription
_isSubscription($aOrder)
Definition: ChPmtTemplate.php:547
$_page
$_page['name_index']
Definition: about_us.php:13
ch_import
ch_import($sClassName, $aModule=array())
Definition: utils.inc.php:1218
$aResult
$aResult
Definition: index.php:19
$_page_cont
$_page_cont[$_ni]['page_main_code']
Definition: about_us.php:24
ChWsbTemplate\addCss
addCss($mixedFiles, $bDynamic=false)
Definition: ChWsbTemplate.php:1114
ChPmtTemplate\__construct
__construct(&$oConfig, &$oDb)
Definition: ChPmtTemplate.php:20
ChPmtTemplate\getPageCodeAdmin
getPageCodeAdmin(&$aParams)
Definition: ChPmtTemplate.php:510
php
$iId
$iId
Definition: license.php:15
ChPmtTemplate\displayCartContent
displayCartContent($aCartInfo, $iVendorId=CH_PMT_EMPTY_ID)
Definition: ChPmtTemplate.php:329
CH_PMT_ORDERS_TYPE_SUBSCRIPTION
const CH_PMT_ORDERS_TYPE_SUBSCRIPTION
Definition: ChPmtModule.php:13
ChBaseSearchResult\showAdminFilterPanel
static showAdminFilterPanel($sFilterValue, $sInputId='filter_input_id', $sCheckboxId='filter_checkbox_id', $sFilterName='filter', $sOnApply='')
Definition: ChBaseSearchResult.php:124
ChPmtTemplate\getPageCodeError
getPageCodeError($sMessage, $bWrap=true)
Definition: ChPmtTemplate.php:497
ChPmtTemplate
Definition: ChPmtTemplate.php:14
ChPmtTemplate\displayHistoryBlock
displayHistoryBlock($iUserId, $iVendorId)
Definition: ChPmtTemplate.php:265
ChPmtTemplate\displayToolbarSubmenu
displayToolbarSubmenu($aInfo)
Definition: ChPmtTemplate.php:284
ChPmtTemplate\getPageCode
getPageCode(&$aParams)
Definition: ChPmtTemplate.php:456
$aInfo
$aInfo
Definition: constants.inc.php:21
$oForm
$oForm
Definition: host_tools.php:42
$sType
$sType
Definition: actions.inc.php:11
ChPmtTemplate\displayMoreWindow
displayMoreWindow()
Definition: ChPmtTemplate.php:34
ChWsbTemplate\_wrapInTagJsCode
_wrapInTagJsCode($sCode)
Definition: ChWsbTemplate.php:1102
$iIndex
$iIndex
Definition: bottom_menu_compose.php:142
CH_PMT_ORDERS_TYPE_PENDING
const CH_PMT_ORDERS_TYPE_PENDING
Definition: ChPmtModule.php:11
ChPmtTemplate\displayOrders
displayOrders($sType, $aParams)
Definition: ChPmtTemplate.php:140
getNickName
getNickName( $ID='')
Definition: profiles.inc.php:461
$oDb
global $oDb
Definition: db.inc.php:39
CH_PMT_ORDERS_TYPE_HISTORY
const CH_PMT_ORDERS_TYPE_HISTORY
Definition: ChPmtModule.php:14
ChPmtTemplate\loadTemplates
loadTemplates()
Definition: ChPmtTemplate.php:26
ChWsbPaginate
Definition: ChWsbPaginate.php:69
global
if(!defined("GLOBAL_MODULE")) define("GLOBAL_MODULE" global
Definition: header.inc.php:25
ChPmtTemplate\displayOrder
displayOrder($sType, $iId)
Definition: ChPmtTemplate.php:74
PageCodeAdmin
PageCodeAdmin($oTemplate=null)
Definition: admin_design.inc.php:45
$sContent
$sContent
Definition: bottom_menu_compose.php:169
_t
_t($key, $arg0="", $arg1="", $arg2="")
Definition: languages.inc.php:509
PageCode
PageCode($oTemplate=null)
Definition: design.inc.php:91
getProfileLink
getProfileLink( $iID, $sLinkAdd='')
Definition: profiles.inc.php:484
CH_PMT_EMPTY_ID
const CH_PMT_EMPTY_ID
Definition: ChPmtModule.php:16
ChWsbTemplate\addJs
addJs($mixedFiles, $bDynamic=false)
Definition: ChWsbTemplate.php:999
ChPmtTemplate\displayAddToCartLink
displayAddToCartLink($iVendorId, $iModuleId, $iItemId, $iItemCount, $bNeedRedirect=false)
Definition: ChPmtTemplate.php:443
ChPmtTemplate\displayCartJs
displayCartJs($bWrapped=true)
Definition: ChPmtTemplate.php:420
PopupBox
PopupBox($sName, $sTitle, $sContent, $aActions=array())
Definition: design.inc.php:189
ChWsbModuleTemplate
Definition: ChWsbModuleTemplate.php:11
$aForm
$aForm
Definition: forgot.php:43
ChBaseSearchResult\showAdminActionsPanel
static showAdminActionsPanel($sWrapperId, $aButtons, $sCheckboxName='entry', $bSelectAll=true, $bSelectAllChecked=false, $sCustomHtml='')
Definition: ChBaseSearchResult.php:81
ChWsbTemplate\setPageMainBoxTitle
setPageMainBoxTitle($sTitle)
Definition: ChWsbTemplate.php:416
ChPmtTemplate\displayOrdersBlock
displayOrdersBlock($sType, $iVendorId)
Definition: ChPmtTemplate.php:232
ChPmtTemplate\displayManualOrderWindow
displayManualOrderWindow($aForm)
Definition: ChPmtTemplate.php:64
empty
Attr AllowedRel this is empty
Definition: Attr.AllowedRel.txt:7
ChWsbService\call
static call($mixed, $sMethod, $aParams=array(), $sClass='Module')
Definition: ChWsbService.php:32
ChWsbTemplate\setPageTitle
setPageTitle($sTitle)
Definition: ChWsbTemplate.php:407
ChPmtTemplate\$_sLangsPrefix
$_sLangsPrefix
Definition: ChPmtTemplate.php:15
as
as
Definition: Filter.ExtractStyleBlocks.Escaping.txt:10
ChWsbTemplate\parseHtmlByName
parseHtmlByName($sName, $aVariables, $mixedKeyWrapperHtml=null, $sCheckIn=CH_WSB_TEMPLATE_CHECK_IN_BOTH)
Definition: ChWsbTemplate.php:660
ChPmtTemplate\displayAddToCartJs
displayAddToCartJs($iVendorId, $iModuleId, $iItemId, $iItemCount, $bNeedRedirect=false, $bWrapped=true)
Definition: ChPmtTemplate.php:427
$GLOBALS
$GLOBALS['iAdminPage']
Definition: advanced_settings.php:10
ChPmtTemplate\getPageCodeResponse
getPageCodeResponse($sMessage)
Definition: ChPmtTemplate.php:484
ChPmtCart\items2array
static items2array($mixed)
Definition: ChPmtCart.php:218