echo $this->item->fulldescription; ?> </div> <?php if (!empty($this->item->bundle_source)) { ?> <div class="bundled-products"> <h3><?php echo JText::_('COM_DIGICOM_PRODUCT_BUNDLE_ITEMS_TITLE'); ?> </h3> <ul> <?php foreach ($this->item->bundleitems as $key => $bitem) { $link = JRoute::_(DigiComHelperRoute::getProductRoute($bitem->id, $bitem->catid, $bitem->language)); ?> <li> <a href="<?php echo $link; ?> "><?php echo $bitem->name; ?> </a> <span class="label"><?php echo DigiComSiteHelperDigicom::format_price2($bitem->price, $conf->get('currency', 'USD'), true, $conf); ?> </span> </li> <?php
</th> <th><?php echo JText::_('COM_DIGICOM_TYPE'); ?> </th> <th><?php echo JText::_('COM_DIGICOM_PRODUCT_PRICE'); ?> </th> </tr> </thead> <tbody> <?php foreach ($order->products as $key => $product) { $productlink = JRoute::_(DigiComHelperRoute::getProductRoute($product->id, $product->catid, $product->language)); ?> <tr> <td> <?php if (!empty($product->images)) { ?> <img width="64" height="64" src="<?php echo JUri::root() . $product->images; ?> " alt="<?php echo $product->name; ?> " /> <?php }
/** * Execute and display a template script. * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * * @return mixed A string if successful, otherwise a Error object. */ public function display($tpl = null) { $app = JFactory::getApplication(); $user = JFactory::getUser(); $dispatcher = JEventDispatcher::getInstance(); $this->item = $this->get('Item'); $this->print = $app->input->getBool('print'); $this->state = $this->get('State'); $this->user = $user; $this->configs = JComponentHelper::getComponent('com_digicom')->params; // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseWarning(500, implode("\n", $errors)); return false; } // Create a shortcut for $item. $item = $this->item; $item->tagLayout = new JLayoutFile('joomla.content.tags'); // Add router helpers. $item->slug = $item->alias ? $item->id . ':' . $item->alias : $item->id; $item->catslug = $item->category_alias ? $item->catid . ':' . $item->category_alias : $item->catid; $item->parent_slug = $item->parent_alias ? $item->parent_id . ':' . $item->parent_alias : $item->parent_id; // No link for ROOT category if ($item->parent_alias == 'root') { $item->parent_slug = null; } // TODO: Change based on shownoauth $item->readmore_link = JRoute::_(DigiComHelperRoute::getproductRoute($item->id, $item->catid, $item->language)); // Merge product params. If this is single-product view, menu params override product params // Otherwise, product params override menu item params $this->params = $this->state->get('params'); $active = $app->getMenu()->getActive(); $temp = clone $this->params; // Check to see which parameters should take priority if ($active) { $currentLink = $active->link; // If the current view is the active item and an product view for this product, then the menu item params take priority if (strpos($currentLink, 'view=product') && strpos($currentLink, '&id=' . (string) $item->id)) { // Load layout from active query (in case it is an alternative menu item) if (isset($active->query['layout'])) { $this->setLayout($active->query['layout']); } elseif ($layout = $item->params->get('product')) { $this->setLayout($layout); } // $item->params are the product params, $temp are the menu item params // Merge so that the menu item params take priority $item->params->merge($temp); } else { // Current view is not a single product, so the product params take priority here // Merge the menu item params with the product params so that the product params take priority $temp->merge($item->params); $item->params = $temp; // Check for alternative layouts (since we are not in a single-product menu item) // Single-product menu item layout takes priority over alt layout for an product if ($layout = $item->params->get('product')) { $this->setLayout($layout); } } } else { // Merge so that product params take priority $temp->merge($item->params); $item->params = $temp; // Check for alternative layouts (since we are not in a single-product menu item) // Single-product menu item layout takes priority over alt layout for an product if ($layout = $item->params->get('product')) { $this->setLayout($layout); } } $offset = $this->state->get('list.offset'); // Check the view access to the product (the model has already computed the values). if ($item->params->get('access-view') == false && $item->params->get('show_noauth', '0') == '0') { JError::raiseWarning(403, JText::_('JERROR_ALERTNOAUTHOR')); return; } if ($item->params->get('show_intro', '1') == '1') { $item->text = $item->description . ' ' . $item->fulldescription; } elseif ($item->fulldescription) { $item->text = $item->fulldescription; } else { $item->text = $item->description; } $item->tags = new JHelperTags(); $item->tags->getItemTags('com_digicom.product', $this->item->id); // Process the content plugins. JPluginHelper::importPlugin('content'); $dispatcher->trigger('onContentPrepare', array('com_digicom.product', &$item, &$this->params, $offset)); $item->event = new stdClass(); $results = $dispatcher->trigger('onContentAfterTitle', array('com_digicom.product', &$item, &$this->params, $offset)); $item->event->afterDisplayTitle = trim(implode("\n", $results)); $results = $dispatcher->trigger('onContentBeforeDisplay', array('com_digicom.product', &$item, &$this->params, $offset)); $item->event->beforeDisplayContent = trim(implode("\n", $results)); $results = $dispatcher->trigger('onContentAfterDisplay', array('com_digicom.product', &$item, &$this->params, $offset)); $item->event->afterDisplayContent = trim(implode("\n", $results)); // Increment the hit counter of the product. if (!$this->params->get('intro_only') && $offset == 0) { $model = $this->getModel(); $model->hit(); } // Escape strings for HTML output $this->pageclass_sfx = htmlspecialchars($this->item->params->get('pageclass_sfx')); $this->_prepareDocument(); $template = new DigiComSiteHelperTemplate($this); $template->rander('product'); parent::display($tpl); }
/** * Method to index an item. The item must be a FinderIndexerResult object. * * @param FinderIndexerResult $item The item to index as an FinderIndexerResult object. * @param string $format The item format. Not used. * * @return void * * @since 2.5 * @throws Exception on database error. */ protected function index(FinderIndexerResult $item, $format = 'html') { $item->setLanguage(); // Check if the extension is enabled. if (JComponentHelper::isEnabled($this->extension) == false) { return; } // Initialise the item parameters. $registry = new Registry(); $registry->loadString($item->params); $item->params = JComponentHelper::getParams('com_digicom', true); $item->params->merge($registry); $registry = new Registry(); $registry->loadString($item->metadata); $item->metadata = $registry; // Trigger the onContentPrepare event. $item->summary = FinderIndexerHelper::prepareContent($item->summary, $item->params); $item->body = FinderIndexerHelper::prepareContent($item->body, $item->params); // Build the necessary route and path information. $item->url = $this->getURL($item->id, $this->extension, $this->layout); $item->route = DigiComHelperRoute::getProductRoute($item->slug, $item->catid, $item->language); $item->path = FinderIndexerHelper::getContentPath($item->route); // Get the menu title if it exists. $title = $this->getItemMenuTitle($item->url); // Adjust the title if necessary. if (!empty($title) && $this->params->get('use_menu_title', true)) { $item->title = $title; } // Add the meta-author. $item->metaauthor = $item->metadata->get('author'); // Add the meta-data processing instructions. $item->addInstruction(FinderIndexer::META_CONTEXT, 'metatitle'); $item->addInstruction(FinderIndexer::META_CONTEXT, 'metakey'); $item->addInstruction(FinderIndexer::META_CONTEXT, 'metadesc'); $item->addInstruction(FinderIndexer::META_CONTEXT, 'metaauthor'); $item->addInstruction(FinderIndexer::META_CONTEXT, 'author'); // Translate the state. Articles should only be published if the category is published. $item->state = $this->translateState($item->state, $item->cat_state); // Add the type taxonomy data. $item->addTaxonomy('Type', 'Article'); // Add the author taxonomy data. if (!empty($item->author)) { $item->addTaxonomy('Author', $item->author); } // Add the category taxonomy data. $item->addTaxonomy('Category', $item->category, $item->cat_state, $item->cat_access); // Add the language taxonomy data. $item->addTaxonomy('Language', $item->language); // Get content extras. FinderIndexerHelper::getContentExtras($item); // Index the item. $this->indexer->index($item); }
?> <ul class="nav nav-menu <?php echo $moduleclass_sfx; ?> "> <?php foreach ($list as $item) { ?> <li <?php if ($_SERVER['REQUEST_URI'] == JRoute::_(DigiComHelperRoute::getCategoryRoute($item->id))) { echo ' class="active"'; } ?> > <a href="<?php echo JRoute::_(DigiComHelperRoute::getCategoryRoute($item->id)); ?> "> <?php echo $item->title; ?> <?php if ($params->get('numitems')) { ?> (<?php echo $item->numitems; ?> ) <?php } ?>
"> <td> <a href="javascript:void(0)" onclick="if (window.parent) window.parent.<?php echo $this->escape($function); ?> ('<?php echo $item->id; ?> ', '<?php echo $this->escape(addslashes($item->name)); ?> ', '<?php echo $this->escape($item->catid); ?> ', null, '<?php echo $this->escape(DigiComHelperRoute::getProductRoute($item->id, $item->catid, $item->language)); ?> ', '<?php echo $this->escape($lang); ?> ', '<?php echo $this->escape($price); ?> ');"> <?php echo $this->escape($item->name); ?> </a> </td> <td class="small"> <?php
?> <ul class="dg-cart-list"> <?php foreach ($list as $index => $item) { ?> <?php // TODO : remove this after issue #52 solve. no false index should be on cart array if ($index < 0) { continue; } ?> <li class="clearfix"> <a href="<?php echo JRoute::_(DigiComHelperRoute::getProductRoute($item->id, $item->catid)); ?> "> <img src="<?php echo DigiComSiteHelperDigiCom::getThumbnail($item->images); ?> " alt="<?php echo $item->name; ?> "/> <?php echo $item->name; ?> </a> <span class="dg-quantity"> <?php