Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

oscflashslide. Can I just get the specials in it.


itfitz

Recommended Posts

Posted

Hi:

 

Below is the code for the flashslide.xml.php, which I assume is where I would have to edit it. I just want to put this on the bottom of the page and scroll only the specials. Any thoughts?

 

thanks,

shawn

 

 

<?php

/*

$Id: products.xml.php,v 0.01 19 Sep 2006

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2006 Jim Chisholm

 

Released under the GNU General Public License

*/

 

// include server parameters

require('includes/application_top.php');

 

//SET THE QUERYS

$sql_query[0] = tep_db_query("select p.products_id, p.products_image, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where products_status = '1' order by p.products_ordered asc limit " . MAX_DISPLAY_NEW_PRODUCTS);

$sql_query[1] = tep_db_query("select p.products_id, p.products_image, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where products_status = '1' order by p.products_last_modified desc limit " . MAX_DISPLAY_NEW_PRODUCTS);

$sql_query[2] = tep_db_query("select p.products_id, p.products_image, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where products_status = '1' order by p.products_quantity desc limit " . MAX_DISPLAY_NEW_PRODUCTS);

$sql_query[3] = tep_db_query("select p.products_id, p.products_image, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where products_status = '1' order by p.products_date_available desc limit " . MAX_DISPLAY_NEW_PRODUCTS);

$sql_query[4] = tep_db_query("select p.products_id, p.products_image, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where products_status = '1' order by p.products_date_added asc limit " . MAX_DISPLAY_NEW_PRODUCTS);

// get a random number

$randomize = rand(0, 4);

$rndChooser = $sql_query[$randomize];

$new_products_query = $rndChooser;

 

echo '<?xml version="1.0"?>

<slideshow>

';

while ($new_products = tep_db_fetch_array($new_products_query)) {

$new_products['products_name'] = tep_get_products_name($new_products['products_id']);

?>

<product id="<?php echo $new_products['products_id']; ?>" name="<?php echo $new_products['products_name']; ?>" image="<?php echo $new_products['products_image']; ?>" link="<?php echo tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']); ?>" price="<?php echo $currencies->display_price($new_products['products_price'], tep_get_tax_rate($new_products['products_tax_class_id'])); ?>" />

<?php

}

echo "</slideshow>";

require('includes/application_bottom.php');

?>

If it was easy, anyone could do it!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...