/** * Return link for current sro * @return string */ public function GenerateLink() { if (empty($this->linkid)) { $this->linkid = _xls_seo_url(_xls_truncate(_xls_encrypt(md5(date("YmdHis"))), 31, '')); $this->save(); return $this->linkid; } else { return $this->linkid; } }
public function __get($strName) { switch ($strName) { case 'RequestUrl': return $this->request_url; case 'PageTitle': return _xls_truncate($this->GetPageMeta('SEO_CUSTOMPAGE_TITLE'), 70); default: return parent::__get($strName); } }
public function readFromSession($page) { switch ($page) { case 2: if (file_exists(Yii::app()->basepath . "/config/wskeys.php")) { $existingKeys = (require Yii::app()->basepath . "/config/wskeys.php"); $this->encryptionKey = $existingKeys['key']; $this->encryptionSalt = $existingKeys['salt']; } else { $this->encryptionKey = _xls_seo_url(_xls_truncate(md5(date("YmdHis")), 50, '')); $this->encryptionSalt = _xls_seo_url(_xls_truncate(md5(date("siHdMY")), 50, '')); } return array('TIMEZONE' => _xls_get_conf('TIMEZONE'), 'LSKEY' => null, 'encryptionKey' => $this->encryptionKey, 'encryptionSalt' => $this->encryptionSalt); case 3: return array('STORE_NAME' => _xls_get_conf('STORE_NAME'), 'EMAIL_FROM' => _xls_get_conf('EMAIL_FROM'), 'STORE_ADDRESS1' => _xls_get_conf('STORE_ADDRESS1'), 'STORE_ADDRESS2' => _xls_get_conf('STORE_ADDRESS2'), 'STORE_CITY' => _xls_get_conf('STORE_CITY'), 'STORE_STATE' => _xls_get_conf('STORE_STATE'), 'STORE_COUNTRY' => _xls_get_conf('STORE_COUNTRY'), 'STORE_ZIP' => _xls_get_conf('STORE_ZIP'), 'STORE_HOURS' => _xls_get_conf('STORE_HOURS'), 'STORE_PHONE' => _xls_get_conf('STORE_PHONE')); case 4: return array('EMAIL_SMTP_SERVER' => _xls_get_conf('EMAIL_SMTP_SERVER'), 'EMAIL_SMTP_PORT' => _xls_get_conf('EMAIL_SMTP_PORT'), 'EMAIL_SMTP_USERNAME' => _xls_get_conf('EMAIL_SMTP_USERNAME'), 'EMAIL_SMTP_PASSWORD' => null, 'EMAIL_SMTP_SECURITY_MODE' => _xls_get_conf('EMAIL_SMTP_SECURITY_MODE')); } }
echo $item->product->Link; ?> "> <img src="<?php echo $item->product->SmallImage; ?> " /> </a> </div> <div class="item_info"> <div id="item-title"> <a href="<?php echo $item->product->Link; ?> "><?php echo _xls_truncate($item->product->Title, 65, "...\n", true); ?> </a> <?php echo $item->comment ? "<div class=\"comment\">" . $item->comment . "</div>" : ""; ?> </div> <div id="item-qty"> <span id="qty-<?php echo $item->id; ?> " class="cart_qty">QTY: <?php echo $item->qty; ?> </span> <?php
public function __get($strName) { switch ($strName) { case 'Name': return $this->Title; case 'IsMaster': return $this->IsMaster(); case 'IsChild': return $this->IsChild(); case 'IsIndependent': return $this->IsIndependent(); case 'Slug': return $this->GetSlug(); case 'Code': if ($this->IsChild()) { if ($prod = $this->GetMaster()) { return $prod->code; } } return $this->code; case 'FkProductMaster': return $this->GetMaster(); case 'InventoryDisplay': return $this->InventoryDisplay(); case 'Family': if (isset($this->family)) { return $this->family->family; } else { return ''; } case 'Class': if (isset($this->class)) { return $this->class->class_name; } else { return ''; } case 'Url': case 'Link': return $this->getUrl(); case 'SEOName': return $this->GetSEOName(); case 'AbsoluteUrl': return $this->GetAbsoluteUrl(); case 'AddToCartImage': return $this->GetImageLink(ImagesType::addtocartmodal); case 'ListingImage': return $this->GetImageLink(ImagesType::listing); case 'ListingImageAbsolute': return $this->GetImageLink(ImagesType::listing, true); case 'MiniImage': return $this->GetImageLink(ImagesType::mini); case 'MiniImageAbsolute': return $this->GetImageLink(ImagesType::mini, true); case 'MiniImageTag': return CHtml::image(Images::GetLink($this->image_id, ImagesType::mini)); case 'PreviewImage': return $this->GetImageLink(ImagesType::preview); case 'PreviewImageAbsolute': return $this->GetImageLink(ImagesType::preview, true); case 'PreviewImageTag': return CHtml::image(Images::GetLink($this->image_id, ImagesType::preview)); case 'SliderImage': return $this->GetImageLink(ImagesType::slider); case 'SliderImageAbsolute': return $this->GetImageLink(ImagesType::slider, true); case 'SliderImageTag': return CHtml::image(Images::GetLink($this->image_id, ImagesType::slider)); case 'CategoryImage': return $this->GetImageLink(ImagesType::category); case 'CategoryImageAbsolute': return $this->GetImageLink(ImagesType::category, true); case 'CategoryImageTag': return CHtml::image(Images::GetLink($this->image_id, ImagesType::category)); case 'PDetailImage': return $this->GetImageLink(ImagesType::pdetail); case 'PDetailImageAbsolute': return $this->GetImageLink(ImagesType::pdetail, true); case 'PDetailImageTag': return CHtml::image(Images::GetLink($this->image_id, ImagesType::pdetail)); case 'SmallImage': return $this->GetImageLink(ImagesType::small); case 'SmallImageAbsolute': return $this->GetImageLink(ImagesType::small, true); case 'SmallImageTag': return CHtml::image(Images::GetLink($this->image_id, ImagesType::small)); case 'Image': return $this->GetImageLink(ImagesType::normal); case 'ImageAbsolute': return $this->GetImageLink(ImagesType::normal, true); case 'ImageTag': return CHtml::image(Images::GetLink($this->image_id, ImagesType::normal)); case 'OriginalCode': return $this->code; case 'SizeLabel': return _xls_get_conf('PRODUCT_SIZE_LABEL', _sp('Size')); case 'ColorLabel': return _xls_get_conf('PRODUCT_COLOR_LABEL', _sp('Color')); case 'PageTitle': return _xls_truncate($this->GetPageMeta('SEO_PRODUCT_TITLE'), 70); case 'PageDescription': return _xls_truncate($this->GetPageMeta('SEO_PRODUCT_DESCRIPTION'), 255); default: return parent::__get($strName); } }
</div> <?php if (count($model) > 0) { ?> <?php $ct = -1; foreach ($model as $objProduct) { if ($objProduct->rowBookendFront) { echo '<div class="row-fluid">'; } //Our product cell is a nested div, containing the graphic and text label with clickable javascript echo CHtml::tag('div', array('class' => 'product_cell span' . 12 / $this->gridProductsPerRow), CHtml::tag('div', array('class' => 'product_cell_graphic', 'onclick' => 'window.location.href=\'' . $objProduct->Link . '\''), CHtml::link(CHtml::image($objProduct->ListingImage, $objProduct->Title), $objProduct->Link)) . CHtml::tag('div', array('class' => 'product_cell_label', 'onclick' => 'window.location.href=\'' . $objProduct->Link . '\''), CHtml::link(_xls_truncate($objProduct->Title, 50), $objProduct->Link) . CHtml::tag('span', array('class' => 'product_cell_price_slash'), $objProduct->getFormattedSlashedPriceWithClickForPricing()) . CHtml::tag('span', array('class' => 'product_cell_price'), $objProduct->Price))); if ($objProduct->rowBookendBack) { echo '</div>'; } } ?> <div class="clearfix"></div> <div id="paginator" class="span12"> <?php $this->widget('CLinkPager', array('id' => 'pagination', 'currentPage' => $pages->getCurrentPage(), 'itemCount' => $item_count, 'pageSize' => _xls_get_conf('PRODUCTS_PER_PAGE'), 'maxButtonCount' => 5, 'firstPageLabel' => '<< ' . Yii::t('global', 'First'), 'lastPageLabel' => Yii::t('global', 'Last') . ' >>', 'prevPageLabel' => '< ' . Yii::t('global', 'Previous'), 'nextPageLabel' => Yii::t('global', 'Next') . ' >', 'header' => '', 'htmlOptions' => array('class' => 'pagination'))); ?> </div>
/** * Define getter / setter */ public function __get($strName) { switch ($strName) { case 'IsPrimary': return $this->IsPrimary(); case 'Slug': return $this->GetSlug(); case 'CanonicalUrl': return $this->getCanonicalUrl(); case 'HasProducts': return $this->HasProducts(); case 'ParentObject': return $this->getParent(); case 'HasImage': return $this->HasImage(); case 'ListingImage': return $this->GetImageLink(ImagesType::listing); case 'MiniImage': return $this->GetImageLink(ImagesType::mini); case 'PreviewImage': return $this->GetImageLink(ImagesType::preview); case 'SliderImage': return $this->GetImageLink(ImagesType::slider); case 'CategoryImage': return $this->GetImageLink(ImagesType::category); case 'PDetailImage': return $this->GetImageLink(ImagesType::pdetail); case 'SmallImage': return $this->GetImageLink(ImagesType::small); case 'Image': return $this->GetImageLink(ImagesType::normal); case 'DirLink': return $this->GetDirLink(); case 'Link': case 'Url': return $this->getLink(); case 'AbsoluteUrl': case 'AbsoluteLink': return $this->GetAbsoluteUrl(); case 'PageTitle': return _xls_truncate($this->GetPageMeta('SEO_CATEGORY_TITLE'), 70); case 'PageDescription': return $this->GetMetaDescription(); default: return parent::__get($strName); } }
?> </th> </tr> </thead> <tbody> <?php foreach ($model->cartItems as $item) { ?> <tr> <td> <a href="<?php echo $item->Link; ?> "><?php echo _xls_truncate($item->description, 65, "...\n", true); ?> </a> </td> <td> <?php echo $item->discount ? sprintf("<strike>%s</strike> ", _xls_currency($item->sell_base)) . _xls_currency($item->sell_discount) : _xls_currency($item->sell); ?> </td> <td class="mlt"> x </td> <td> <span class="cart_qty"> <?php if (isset($this->intEditMode) && $this->intEditMode) {
<article class="twocolumn"> <div class="column item-confirm"> <header> <h1><?php echo Yii::t('cart', 'Item added to your cart'); ?> </h1> </header> <div class="content"> <?php echo CHtml::image($this->objCartItem->Prod->AddToCartImage); ?> <div class="product-data"> <h3 id="product-title"><?php echo _xls_truncate($this->objCartItem->description, 50); ?> </h3> <p id="addtocart-sku" class="sku"><?php echo $this->objCartItem->code; ?> </p> <p id ="addtocart-quantity" class="quantity"><?php echo Yii::t('cart', 'Quantity') . ': ' . $this->objCartItem->qty; ?> </p> <p id="addtocart-price" class="price"><?php echo _xls_currency($this->objCartItem->sell_total); ?> </p> <?php
<td class="span1"> <?php echo $objProduct->id; ?> </td> <td class="span1"><img src="<?php echo $objProduct->SmallImage; ?> " width="30px;" alt=""/></td> <td class="span4"> <?php echo _xls_truncate($objProduct->Title, 80); ?> </td> <td class="span2"><?php echo _xls_truncate($objProduct->Code, 80); ?> </td> <td class="span2 pull-center"><a href="<?php echo $this->createUrl('multicategory/view', $_link_params); ?> "><?php echo Yii::t('admin', 'Edit'); ?> </a></td> </tr> <?php } ?> <?php } else {
function _xls_get_current_customer_name() { $blnLoggedIn = !Yii::app()->user->isGuest; if ($blnLoggedIn) { if (strlen(Yii::app()->user->fullname) < 13) { return Yii::app()->user->fullname; } else { return _xls_truncate(Yii::app()->user->firstname, 13); } } else { return "My Account"; } }