Exemple #1
0
 function start()
 {
     global $osC_Specials;
     require 'includes/classes/specials.php';
     $osC_Specials = new osC_Specials();
     $osC_Specials->activateAll();
     $osC_Specials->expireAll();
     return true;
 }
 function buildProductsRss($group)
 {
     global $osC_Language, $osC_Image;
     $group_title = $group . '_products';
     $rss = array();
     $rss['rss'] = array();
     $rss['rss attr'] = array('xmlns:atom' => 'http://www.w3.org/2005/Atom', 'version' => '2.0');
     //channel
     $rss['rss']['channel'] = array('title' => '<![CDATA[' . $osC_Language->get($group_title) . ']]>', 'link' => '<![CDATA[' . osc_href_link(FILENAME_PRODUCTS, $group) . ']]>', 'description' => '<![CDATA[' . $osC_Language->get($group_title) . ']]>', 'pubDate' => date("D, d M Y H:i:s O"));
     //items
     if ($group == "new") {
         $Qproducts = osC_Product::getListingNew();
     } else {
         if ($group == 'special') {
             $Qproducts = osC_Specials::getListing();
         } else {
             if ($group == 'feature') {
                 $Qproducts = osC_Product::getListingFeature();
             }
         }
     }
     $items = array();
     while ($Qproducts->next()) {
         $osC_Product = new osC_Product($Qproducts->valueInt('products_id'));
         $link = osc_href_link(FILENAME_PRODUCTS, $Qproducts->valueInt('products_id'), 'NONSSL', false, false, true);
         $description = '
     <![CDATA[
     <table>
       <tr>
         <td align="center" valign="top">' . osc_link_object($link, osc_image($osC_Image->getImageUrl($osC_Product->getImage(), 'product_info'), $osC_Product->getTitle())) . '</td>
         <td valign="top">' . $osC_Product->getDescription() . '</td>
       </tr>
     </table>
     ]]>';
         $items[] = array('title' => '<![CDATA[' . $osC_Product->getTitle() . ' -- ' . $osC_Product->getPriceFormated() . ']]>', 'link' => '<![CDATA[' . $link . ']]>', 'description' => $description, 'pubDate' => date("D, d M Y H:i:s O"));
     }
     $rss['rss']['channel']['item'] = $items;
     return $rss;
 }
Exemple #3
0
<?php

/*
  $Id: specials.php $
  TomatoCart Open Source Shopping Cart Solutions
  http://www.tomatocart.com

  Copyright (c) 2009 Wuxi Elootec Technology Co., Ltd;  Copyright (c) 2007 osCommerce

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License v2 (1991)
  as published by the Free Software Foundation.
*/
$Qspecials = osC_Specials::getListing();
?>

<h1><?php 
echo $osC_Template->getPageTitle();
?>
</h1>

<div class="moduleBox">

  <?php 
if ($Qspecials->numberOfRows() > 0) {
    ?>
    <div class="content">
  
      <?php 
    $i = 0;
    while ($Qspecials->next()) {
<?php

/**
 * TomatoCart Open Source Shopping Cart Solution
 * 
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License v3 (2007)
 * as published by the Free Software Foundation.
 *
 * @package      TomatoCart
 * @author       TomatoCart Dev Team
 * @copyright    Copyright (c) 2009 - 2012, TomatoCart. All rights reserved.
 * @license      http://www.gnu.org/licenses/gpl.html
 * @link         http://tomatocart.com
 * @since        Version 1.1.8
 * @filesource
*/
$Qlisting = osC_Specials::getListing();
?>

<h1><?php 
echo $osC_Template->getPageTitle();
?>
</h1>

<?php 
include 'templates/' . $osC_Template->getCode() . '/modules/product_listing.php';