本文整理汇总了PHP中Isotope\Isotope类的典型用法代码示例。如果您正苦于以下问题:PHP Isotope类的具体用法?PHP Isotope怎么用?PHP Isotope使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Isotope类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: isAvailable
/**
* Check the cart currency for ePay support
*
* @return bool
*/
public function isAvailable()
{
if (!static::supportsCurrency(Isotope::getConfig()->currency)) {
return false;
}
return parent::isAvailable();
}
开发者ID:rpquadrat,项目名称:core,代码行数:12,代码来源:EPay.php
示例2: isAvailable
/**
* Check the cart currency for ePay support
*
* @return bool
*/
public function isAvailable()
{
if (!Currency::isSupported(Isotope::getConfig()->currency)) {
return false;
}
return parent::isAvailable();
}
开发者ID:ralfhartmann,项目名称:isotope_core,代码行数:12,代码来源:EPay.php
示例3: compile
/**
* Generate the module
*/
protected function compile()
{
$objCart = Isotope::getCart();
$objAddress = $objCart->getShippingAddress();
$this->Template->showResults = false;
$this->Template->requiresShipping = false;
// There is no address
if (!$objAddress->id) {
return;
}
$this->Template->showResults = true;
$arrMethods = array();
// Get the shipping methods
if ($objAddress->id && $objCart->requiresShipping()) {
$this->Template->requiresShipping = true;
$objShippingMethods = Shipping::findMultipleByIds($this->arrShippingMethods);
/* @var Shipping $objShipping */
foreach ($objShippingMethods as $objShipping) {
if ($objShipping->isAvailable()) {
$fltPrice = $objShipping->getPrice();
$arrMethods[] = array('label' => $objShipping->getLabel(), 'price' => $fltPrice, 'formatted_price' => Isotope::formatPriceWithCurrency($fltPrice), 'shipping' => $objShipping);
}
}
RowClass::withKey('rowClass')->addCount('row_')->addFirstLast('row_')->addEvenOdd('row_')->applyTo($arrMethods);
}
$this->Template->shippingMethods = $arrMethods;
}
开发者ID:ralfhartmann,项目名称:isotope_core,代码行数:30,代码来源:ShippingCalculator.php
示例4: generate
/**
* Generate the checkout step
*
* @return string
*/
public function generate()
{
$objTemplate = new Template($this->objModule->iso_collectionTpl);
$objOrder = Isotope::getCart()->getDraftOrder();
$objOrder->addToTemplate($objTemplate, array('gallery' => $this->objModule->iso_gallery, 'sorting' => $objOrder->getItemsSortingCallable($this->objModule->iso_orderCollectionBy)));
return $objTemplate->parse();
}
开发者ID:ralfhartmann,项目名称:isotope_core,代码行数:12,代码来源:OrderProducts.php
示例5: findProducts
/**
* Fill the object's arrProducts array
*
* @param array|null $arrCacheIds
*
* @return array
*/
protected function findProducts($arrCacheIds = null)
{
$t = Product::getTable();
$arrColumns = array();
$arrCategories = $this->findCategories();
$arrProductIds = \Database::getInstance()->query("\n SELECT pid\n FROM tl_iso_product_category\n WHERE page_id IN (" . implode(',', $arrCategories) . ")\n ")->fetchEach('pid');
$arrTypes = \Database::getInstance()->query("SELECT id FROM tl_iso_producttype WHERE variants='1'")->fetchEach('id');
if (empty($arrProductIds)) {
return array();
}
$queryBuilder = new FilterQueryBuilder(Isotope::getRequestCache()->getFiltersForModules($this->iso_filterModules));
$arrColumns[] = "(\n ({$t}.id IN (" . implode(',', $arrProductIds) . ") AND {$t}.type NOT IN (" . implode(',', $arrTypes) . "))\n OR {$t}.pid IN (" . implode(',', $arrProductIds) . ")\n )";
if (!empty($arrCacheIds) && is_array($arrCacheIds)) {
$arrColumns[] = Product::getTable() . ".id IN (" . implode(',', $arrCacheIds) . ")";
}
// Apply new/old product filter
if ($this->iso_newFilter == 'show_new') {
$arrColumns[] = Product::getTable() . ".dateAdded>=" . Isotope::getConfig()->getNewProductLimit();
} elseif ($this->iso_newFilter == 'show_old') {
$arrColumns[] = Product::getTable() . ".dateAdded<" . Isotope::getConfig()->getNewProductLimit();
}
if ($this->iso_list_where != '') {
$arrColumns[] = $this->iso_list_where;
}
if ($queryBuilder->hasSqlCondition()) {
$arrColumns[] = $queryBuilder->getSqlWhere();
}
$arrSorting = Isotope::getRequestCache()->getSortingsForModules($this->iso_filterModules);
if (empty($arrSorting) && $this->iso_listingSortField != '') {
$direction = $this->iso_listingSortDirection == 'DESC' ? Sort::descending() : Sort::ascending();
$arrSorting[$this->iso_listingSortField] = $direction;
}
$objProducts = Product::findAvailableBy($arrColumns, $queryBuilder->getSqlValues(), array('order' => 'c.sorting', 'filters' => $queryBuilder->getFilters(), 'sorting' => $arrSorting));
return null === $objProducts ? array() : $objProducts->getModels();
}
开发者ID:ralfhartmann,项目名称:isotope_core,代码行数:42,代码来源:ProductVariantList.php
示例6: generate
/**
* Generate the checkout step
* @return string
*/
public function generate()
{
// Make sure field data is available
\Controller::loadDataContainer('tl_iso_product_collection');
\System::loadLanguageFile('tl_iso_product_collection');
$objTemplate = new Template($this->strTemplate);
$varValue = null;
$objWidget = new FormTextArea(FormTextArea::getAttributesFromDca($GLOBALS['TL_DCA'][$this->strTable]['fields'][$this->strField], $this->strField, $varValue, $this->strField, $this->strTable, $this));
$objWidget->storeValues = true;
if (\Input::post('FORM_SUBMIT') == $this->strFormId) {
$objWidget->validate();
$varValue = $objWidget->value;
// Do not submit the field if there are errors
if ($objWidget->hasErrors()) {
$doNotSubmit = true;
} elseif ($objWidget->submitInput()) {
$objOrder = Isotope::getCart()->getDraftOrder();
// Store the form data
$_SESSION['FORM_DATA'][$this->strField] = $varValue;
// Set the correct empty value (see #6284, #6373)
if ($varValue === '') {
$varValue = $objWidget->getEmptyValue();
}
// Set the new value
if ($varValue !== $objOrder->{$this->strField}) {
$objOrder->{$this->strField};
}
}
}
$objTemplate->headline = $GLOBALS['TL_LANG'][$this->strTable][$this->strField][0];
$objTemplate->customerNotes = $objWidget->parse();
return $objTemplate->parse();
}
开发者ID:intelligentspark,项目名称:isotope_checkout_step_order_notes,代码行数:37,代码来源:OrderNotes.php
示例7: isAvailable
/**
* sofortueberweisung.de only supports these currencies
* @return true
*/
public function isAvailable()
{
if (!in_array(Isotope::getConfig()->currency, array('EUR', 'CHF', 'GBP'))) {
return false;
}
return parent::isAvailable();
}
开发者ID:Aziz-JH,项目名称:core,代码行数:11,代码来源:Sofortueberweisung.php
示例8: compile
/**
* Generate the module
*/
protected function compile()
{
// Also check owner (see #126)
if (($objOrder = Order::findOneBy('uniqid', (string) \Input::get('uid'))) === null || FE_USER_LOGGED_IN === true && $objOrder->member > 0 && \FrontendUser::getInstance()->id != $objOrder->member) {
$this->Template = new \Isotope\Template('mod_message');
$this->Template->type = 'error';
$this->Template->message = $GLOBALS['TL_LANG']['ERR']['orderNotFound'];
return;
}
// Order belongs to a member but not logged in
if (TL_MODE == 'FE' && $this->iso_loginRequired && $objOrder->member > 0 && FE_USER_LOGGED_IN !== true) {
global $objPage;
$objHandler = new $GLOBALS['TL_PTY']['error_403']();
$objHandler->generate($objPage->id);
exit;
}
Isotope::setConfig($objOrder->getRelated('config_id'));
$objTemplate = new \Isotope\Template($this->iso_collectionTpl);
$objTemplate->linkProducts = true;
$objOrder->addToTemplate($objTemplate, array('gallery' => $this->iso_gallery, 'sorting' => $objOrder->getItemsSortingCallable($this->iso_orderCollectionBy)));
$this->Template->collection = $objOrder;
$this->Template->products = $objTemplate->parse();
$this->Template->info = deserialize($objOrder->checkout_info, true);
$this->Template->date = Format::date($objOrder->locked);
$this->Template->time = Format::time($objOrder->locked);
$this->Template->datim = Format::datim($objOrder->locked);
$this->Template->orderDetailsHeadline = sprintf($GLOBALS['TL_LANG']['MSC']['orderDetailsHeadline'], $objOrder->document_number, $this->Template->datim);
$this->Template->orderStatus = sprintf($GLOBALS['TL_LANG']['MSC']['orderStatusHeadline'], $objOrder->getStatusLabel());
$this->Template->orderStatusKey = $objOrder->getStatusAlias();
}
开发者ID:Aziz-JH,项目名称:core,代码行数:33,代码来源:OrderDetails.php
示例9: isAvailable
/**
* Paybyway only supports EUR currency
* @return bool
*/
public function isAvailable()
{
$objConfig = Isotope::getConfig();
if (null === $objConfig || $objConfig->currency != 'EUR') {
return false;
}
return parent::isAvailable();
}
开发者ID:ralfhartmann,项目名称:isotope_core,代码行数:12,代码来源:Paybyway.php
示例10: addOrderCondition
/**
* Automatically add Billpay conditions to checkout form
*
* @param Form $objForm
* @param \Module $objModule
*/
public static function addOrderCondition(Form $objForm, \Module $objModule)
{
if (Isotope::getCart()->hasPayment() && Isotope::getCart()->getPaymentMethod() instanceof BillpayWithSaferpay) {
$strLabel = $GLOBALS['TL_LANG']['MSC']['billpay_agb_' . Isotope::getCart()->getBillingAddress()->country];
if ($strLabel == '') {
throw new \LogicException('Missing BillPay AGB for country "' . Isotope::getCart()->getBillingAddress()->country . '" and language "' . $GLOBALS['TL_LANGUAGE'] . '"');
}
$objForm->addFormField('billpay_confirmation', array('label' => array('', $strLabel), 'inputType' => 'checkbox', 'eval' => array('mandatory' => true)));
}
}
开发者ID:ralfhartmann,项目名称:isotope_core,代码行数:16,代码来源:BillpayWithSaferpay.php
示例11: generate
public function generate(IsotopeProduct $objProduct, array $arrOptions = array())
{
$arrData = deserialize($objProduct->{$this->field_name});
if (is_array($arrData) && $arrData['unit'] > 0 && $arrData['value'] != '') {
$objBasePrice = \Isotope\Model\BasePrice::findByPk((int) $arrData['unit']);
if (null !== $objBasePrice && null !== $objProduct->getPrice()) {
return sprintf($objBasePrice->getLabel(), Isotope::formatPriceWithCurrency($objProduct->getPrice()->getAmount() / $arrData['value'] * $objBasePrice->amount), $arrData['value']);
}
}
return '';
}
开发者ID:ralfhartmann,项目名称:isotope_core,代码行数:11,代码来源:BasePrice.php
示例12: compile
/**
* Compile the module
* @return void
*/
protected function compile()
{
$arrConfigs = array();
$objConfigs = Config::findMultipleByIds($this->iso_config_ids);
if (null !== $objConfigs) {
while ($objConfigs->next()) {
$arrConfigs[] = array('config' => $objConfigs->current(), 'label' => $objConfigs->current()->getLabel(), 'active' => Isotope::getConfig()->id == $objConfigs->id ? true : false, 'href' => \Environment::get('request') . (strpos(\Environment::get('request'), '?') === false ? '?' : '&') . 'config=' . $objConfigs->id);
}
}
\Haste\Generator\RowClass::withKey('class')->addFirstLast()->applyTo($arrConfigs);
$this->Template->configs = $arrConfigs;
}
开发者ID:Aziz-JH,项目名称:core,代码行数:16,代码来源:ConfigSwitcher.php
示例13: trackGATransaction
/**
* Actually execute the GoogleAnalytics tracking
* @param Database_Result
* @param IsotopeProductCollection
*/
protected function trackGATransaction($objConfig, $objOrder)
{
// Initilize GA Tracker
$tracker = new \UnitedPrototype\GoogleAnalytics\Tracker($objConfig->ga_account, \Environment::get('base'));
// Assemble Visitor information
// (could also get unserialized from database)
$visitor = new \UnitedPrototype\GoogleAnalytics\Visitor();
$visitor->setIpAddress(\Environment::get('ip'));
$visitor->setUserAgent(\Environment::get('httpUserAgent'));
$transaction = new \UnitedPrototype\GoogleAnalytics\Transaction();
$transaction->setOrderId($objOrder->order_id);
$transaction->setAffiliation($objConfig->name);
$transaction->setTotal($objOrder->getTotal());
$transaction->setTax($objOrder->getTotal() - $objOrder->getTaxFreeTotal());
// $transaction->setShipping($objOrder->shippingTotal);
$objAddress = $objOrder->getBillingAddress();
$transaction->setCity($objAddress->city);
if ($objAddress->subdivision) {
$arrSub = explode("-", $objAddress->subdivision, 2);
$transaction->setRegion($arrSub[1]);
}
$transaction->setCountry($objAddress->country);
/** @var \Isotope\Model\ProductCollectionItem $objItem */
foreach ($objOrder->getItems() as $objItem) {
$item = new \UnitedPrototype\GoogleAnalytics\Item();
if ($objItem->getSku()) {
$item->setSku($objItem->getSku());
} else {
$item->setSku('product' . $objItem->product_id);
}
$item->setName($objItem->getName());
$item->setPrice($objItem->getPrice());
$item->setQuantity($objItem->quantity);
$arrOptionValues = array();
foreach (Isotope::formatOptions($objItem->getOptions()) as $option) {
$arrOptionValues[] = $option['value'];
}
if (!empty($arrOptionValues)) {
$item->setVariation(implode(', ', $arrOptionValues));
}
$transaction->addItem($item);
}
// Track logged-in member as custom variable
if ($objConfig->ga_member != '' && $objOrder->member > 0 && ($objMember = \MemberModel::findByPk($objOrder->member)) !== null) {
$customVar = new \UnitedPrototype\GoogleAnalytics\CustomVariable(1, 'Member', $this->parseSimpleTokens($objConfig->ga_member, $objMember->row()), \UnitedPrototype\GoogleAnalytics\CustomVariable::SCOPE_VISITOR);
$tracker->addCustomVariable($customVar);
}
// Assemble Session information
// (could also get unserialized from PHP session)
$session = new \UnitedPrototype\GoogleAnalytics\Session();
$tracker->trackTransaction($transaction, $session, $visitor);
}
开发者ID:Aziz-JH,项目名称:core,代码行数:57,代码来源:Analytics.php
示例14: limitCountries
/**
* Limit the member countries to the selection in store config
* @param string
*/
public function limitCountries($strTable)
{
if ($strTable != 'tl_member' || !Isotope::getConfig()->limitMemberCountries) {
return;
}
$arrCountries = array_unique(array_merge(Isotope::getConfig()->getBillingCountries(), Isotope::getConfig()->getShippingCountries()));
$arrCountries = array_intersect_key($GLOBALS['TL_DCA']['tl_member']['fields']['country']['options'], array_flip($arrCountries));
$GLOBALS['TL_DCA']['tl_member']['fields']['country']['options'] = $arrCountries;
if (count($arrCountries) == 1) {
$arrCountryCodes = array_keys($arrCountries);
$GLOBALS['TL_DCA']['tl_member']['fields']['country']['default'] = $arrCountryCodes[0];
}
}
开发者ID:ralfhartmann,项目名称:isotope_core,代码行数:17,代码来源:Callback.php
示例15: isAvailable
/**
* SEPA only supports these currencies
* @return true
*/
public function isAvailable()
{
if (!in_array(Isotope::getConfig()->currency, array('EUR'))) {
return false;
}
if (!FE_USER_LOGGED_IN) {
return false;
} else {
$user = \FrontendUser::getInstance();
if (!isset($user->iso_sepa_active) || $user->iso_sepa_active != "1") {
return false;
}
}
return parent::isAvailable();
}
开发者ID:comolo,项目名称:isotope-sepa_direct_debit,代码行数:19,代码来源:SepaDirectDeposit.php
示例16: checkoutForm
/**
* HTML form for checkout
* @param IsotopeProductCollection The order being places
* @param Module The checkout module instance
* @return mixed
*/
public function checkoutForm(IsotopeProductCollection $objOrder, \Module $objModule)
{
$i = 0;
$arrData = array('aid' => $this->payone_aid, 'portalid' => $this->payone_portalid, 'mode' => $this->debug ? 'test' : 'live', 'request' => $this->trans_type == 'auth' ? 'preauthorization' : 'authorization', 'encoding' => 'UTF-8', 'clearingtype' => $this->payone_clearingtype, 'reference' => $objOrder->id, 'display_name' => 'no', 'display_address' => 'no', 'successurl' => \Environment::get('base') . $objModule->generateUrlForStep('complete', $objOrder), 'backurl' => \Environment::get('base') . $objModule->generateUrlForStep('failed'), 'amount' => $objOrder->getTotal() * 100, 'currency' => $objOrder->currency, 'param' => 'paymentMethodPayone' . $this->id);
foreach ($objOrder->getItems() as $objItem) {
// Set the active product for insert tags replacement
if ($objItem->hasProduct()) {
Product::setActive($objItem->getProduct());
}
$strOptions = '';
$arrOptions = Isotope::formatOptions($objItem->getOptions());
Product::unsetActive();
if (!empty($arrOptions)) {
array_walk($arrOptions, function (&$option) {
$option = $option['label'] . ': ' . $option['value'];
});
$strOptions = ' (' . implode(', ', $arrOptions) . ')';
}
$arrData['id[' . ++$i . ']'] = $objItem->getSku();
$arrData['pr[' . $i . ']'] = round($objItem->getPrice(), 2) * 100;
$arrData['no[' . $i . ']'] = $objItem->quantity;
$arrData['de[' . $i . ']'] = specialchars($objItem->getName() . $strOptions);
}
foreach ($objOrder->getSurcharges() as $k => $objSurcharge) {
if (!$objSurcharge->addToTotal) {
continue;
}
$arrData['id[' . ++$i . ']'] = 'surcharge' . $k;
$arrData['pr[' . $i . ']'] = $objSurcharge->total_price * 100;
$arrData['no[' . $i . ']'] = '1';
$arrData['de[' . $i . ']'] = $objSurcharge->label;
}
ksort($arrData);
// Do not urlencode values because Payone does not properly decode POST values (whatever...)
$strHash = md5(implode('', $arrData) . $this->payone_key);
$objTemplate = new \Isotope\Template('iso_payment_payone');
$objTemplate->id = $this->id;
$objTemplate->data = $arrData;
$objTemplate->hash = $strHash;
$objTemplate->billing_address = $objOrder->getBillingAddress()->row();
$objTemplate->headline = $GLOBALS['TL_LANG']['MSC']['pay_with_redirect'][0];
$objTemplate->message = $GLOBALS['TL_LANG']['MSC']['pay_with_redirect'][1];
$objTemplate->slabel = specialchars($GLOBALS['TL_LANG']['MSC']['pay_with_redirect'][2]);
return $objTemplate->parse();
}
开发者ID:Aziz-JH,项目名称:core,代码行数:51,代码来源:Payone.php
示例17: __construct
/**
* Load libraries and scripts
* @param object
* @param string
* @return void
*/
public function __construct($objModule, $strColumn = 'main')
{
parent::__construct($objModule, $strColumn);
Isotope::initialize();
if (TL_MODE == 'FE') {
// Load Isotope javascript and css
$GLOBALS['TL_JAVASCRIPT'][] = \Haste\Util\Debug::uncompressedFile('system/modules/isotope/assets/js/isotope.min.js');
$GLOBALS['TL_CSS'][] = \Haste\Util\Debug::uncompressedFile('system/modules/isotope/assets/css/isotope.min.css');
// Disable caching for pages with certain modules (eg. Cart)
if ($this->blnDisableCache) {
try {
global $objPage;
$objPage->cache = 0;
} catch (\Exception $e) {
}
}
}
}
开发者ID:Aziz-JH,项目名称:core,代码行数:24,代码来源:Module.php
示例18: compile
/**
* Generate the module
* @return void
*/
protected function compile()
{
$arrOrders = array();
$objOrders = Order::findBy(array('order_status>0', 'member=?', 'config_id IN (?)'), array(\FrontendUser::getInstance()->id, implode("','", $this->iso_config_ids)), array('order' => 'locked DESC'));
// No orders found, just display an "empty" message
if (null === $objOrders) {
$this->Template = new \Isotope\Template('mod_message');
$this->Template->type = 'empty';
$this->Template->message = $GLOBALS['TL_LANG']['ERR']['emptyOrderHistory'];
return;
}
while ($objOrders->next()) {
Isotope::setConfig($objOrders->current()->getRelated('config_id'));
$arrOrders[] = array('collection' => $objOrders->current(), 'raw' => $objOrders->current()->row(), 'date' => Format::date($objOrders->current()->locked), 'time' => Format::time($objOrders->current()->locked), 'datime' => Format::datim($objOrders->current()->locked), 'grandTotal' => Isotope::formatPriceWithCurrency($objOrders->current()->getTotal()), 'status' => $objOrders->current()->getStatusLabel(), 'link' => $this->jumpTo ? \Haste\Util\Url::addQueryString('uid=' . $objOrders->current()->uniqid, $this->jumpTo) : '', 'class' => $objOrders->current()->getStatusAlias());
}
RowClass::withKey('class')->addFirstLast()->addEvenOdd()->applyTo($arrOrders);
$this->Template->orders = $arrOrders;
}
开发者ID:Aziz-JH,项目名称:core,代码行数:22,代码来源:OrderHistory.php
示例19: getDailySummary
/**
* Generate a daily summary for the overview page
* @return array
*/
protected function getDailySummary()
{
$strBuffer = '
<div class="tl_formbody_edit be_iso_overview">
<fieldset class="tl_tbox">
<legend style="cursor: default;">' . $GLOBALS['TL_LANG']['ISO_REPORT']['24h_summary'] . '</legend>';
$arrAllowedProducts = \Isotope\Backend\Product\Permission::getAllowedIds();
$objOrders = \Database::getInstance()->prepare("\n SELECT\n c.id AS config_id,\n c.name AS config_name,\n c.currency,\n COUNT(DISTINCT o.id) AS total_orders,\n SUM(i.tax_free_price * i.quantity) AS total_sales,\n SUM(i.quantity) AS total_items\n FROM tl_iso_product_collection o\n LEFT JOIN tl_iso_product_collection_item i ON o.id=i.pid\n LEFT OUTER JOIN tl_iso_config c ON o.config_id=c.id\n WHERE o.type='order' AND o.order_status>0 AND o.locked>=?\n " . Report::getProductProcedure('i', 'product_id') . "\n " . Report::getConfigProcedure('o', 'config_id') . "\n GROUP BY config_id\n ")->execute(strtotime('-24 hours'));
if (!$objOrders->numRows) {
$strBuffer .= '
<p class="tl_info" style="margin-top:10px">' . $GLOBALS['TL_LANG']['ISO_REPORT']['24h_empty'] . '</p>';
} else {
$i = -1;
$strBuffer .= '
<br>
<table class="tl_listing">
<tr>
<th class="tl_folder_tlist">' . $GLOBALS['TL_LANG']['ISO_REPORT']['shop_config'] . '</th>
<th class="tl_folder_tlist">' . $GLOBALS['TL_LANG']['ISO_REPORT']['currency'] . '</th>
<th class="tl_folder_tlist">' . $GLOBALS['TL_LANG']['ISO_REPORT']['orders#'] . '</th>
<th class="tl_folder_tlist">' . $GLOBALS['TL_LANG']['ISO_REPORT']['products#'] . '</th>
<th class="tl_folder_tlist">' . $GLOBALS['TL_LANG']['ISO_REPORT']['sales#'] . '</th>
</tr>';
while ($objOrders->next()) {
$strBuffer .= '
<tr class="row_' . ++$i . ($i % 2 ? 'odd' : 'even') . '">
<td class="tl_file_list">' . $objOrders->config_name . '</td>
<td class="tl_file_list">' . $objOrders->currency . '</td>
<td class="tl_file_list">' . $objOrders->total_orders . '</td>
<td class="tl_file_list">' . $objOrders->total_items . '</td>
<td class="tl_file_list">' . Isotope::formatPrice($objOrders->total_sales) . '</td>
</tr>';
}
$strBuffer .= '
</table>';
}
$strBuffer .= '
</fieldset>
</div>';
return $strBuffer;
}
开发者ID:ralfhartmann,项目名称:isotope_core,代码行数:45,代码来源:Reports.php
示例20: generate
/**
* Generate the checkout step
* @return string
*/
public function generate()
{
$objTemplate = new Template($this->strTemplate);
$arrAttributes = ['dateDirection' => 'gtToday', 'inputType' => 'calendar', 'eval' => ['required' => true, 'rgxp' => 'date', 'datepicker' => true]];
$varValue = null;
$objWidget = new FormCalendarField(FormCalendarField::getAttributesFromDca($arrAttributes, $this->strField, $varValue, $this->strField, $this->strTable, $this));
$objWidget->storeValues = true;
if (\Input::post('FORM_SUBMIT') == $this->strFormId) {
$objWidget->validate();
$varValue = $objWidget->value;
$rgxp = $arrAttributes['eval']['rgxp'];
// Convert date formats into timestamps (check the eval setting first -> #3063)
if ($varValue != '' && in_array($rgxp, array('date', 'time', 'datim'))) {
try {
$objDate = new \Date($varValue, \Date::getFormatFromRgxp($rgxp));
$varValue = $objDate->tstamp;
} catch (\OutOfBoundsException $e) {
$objWidget->addError(sprintf($GLOBALS['TL_LANG']['ERR']['invalidDate'], $varValue));
}
}
// Do not submit the field if there are errors
if ($objWidget->hasErrors()) {
$doNotSubmit = true;
} elseif ($objWidget->submitInput()) {
$objOrder = Isotope::getCart()->getDraftOrder();
// Store the form data
$_SESSION['FORM_DATA'][$this->strField] = $varValue;
// Set the correct empty value (see #6284, #6373)
if ($varValue === '') {
$varValue = $objWidget->getEmptyValue();
}
// Set the new value
if ($varValue !== $objOrder->{$this->strField}) {
$objOrder->{$this->strField};
}
}
}
$objTemplate->headline = $GLOBALS['TL_LANG'][$this->strTable]['date_picker'][0];
$objTemplate->datePicker = $objWidget->parse();
return $objTemplate->parse();
}
开发者ID:intelligentspark,项目名称:isotope_checkout_step_delivery_date,代码行数:45,代码来源:DeliveryDate.php
注:本文中的Isotope\Isotope类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论