Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Special Offers Module

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #11  
Old 06-16-2003, 05:59 AM
 
jgkiefer jgkiefer is offline
 

Advanced Member
  
Join Date: Apr 2003
Posts: 85
 

Default

Quote:
Originally Posted by funkydunk
Shan,

Yep - Am building a site at the moment with this in a lhs menu.

Limited it to show 3 products though cos of space.

How is this coming along?
Reply With Quote
  #12  
Old 06-16-2003, 06:40 AM
 
funkydunk funkydunk is offline
 

X-Man
  
Join Date: Oct 2002
Location: Cambridge, UK
Posts: 2,210
 

Default

This has been done.

lhs menu shows a selection of three products that have a discount applied then a link to a special offers page that lists all products with the normal navigation through the pages.
__________________
ex x-cart guru
Reply With Quote
  #13  
Old 06-16-2003, 07:03 AM
 
jgkiefer jgkiefer is offline
 

Advanced Member
  
Join Date: Apr 2003
Posts: 85
 

Default

How much is 120L in dollars?
Reply With Quote
  #14  
Old 06-16-2003, 07:28 AM
 
funkydunk funkydunk is offline
 

X-Man
  
Join Date: Oct 2002
Location: Cambridge, UK
Posts: 2,210
 

Default

120 what?
__________________
ex x-cart guru
Reply With Quote
  #15  
Old 06-16-2003, 11:11 AM
 
jgkiefer jgkiefer is offline
 

Advanced Member
  
Join Date: Apr 2003
Posts: 85
 

Default

Your site says that that mod costs 120L.
Reply With Quote
  #16  
Old 06-16-2003, 11:42 AM
 
funkydunk funkydunk is offline
 

X-Man
  
Join Date: Oct 2002
Location: Cambridge, UK
Posts: 2,210
 

Default

sorry - you lost me then... the L is actually a бё GBP

if you pm me I can confirm details of costings etc.
__________________
ex x-cart guru
Reply With Quote
  #17  
Old 05-29-2004, 04:40 AM
  enge919's Avatar 
enge919 enge919 is offline
 

Senior Member
  
Join Date: May 2003
Posts: 141
 

Default

Does anyone know if this works in 3.5.x?

I need this for a client with 3.5.4 but we want to modify it to just randomly pull 6 items from the database to display without being dependent on the item being marked down. In other word he does not show marked down items but want the home page to always be fresh.

UPDATED: See my fix below to use this with or without discounted products in 3.5.x!
__________________
Web site design - Custom Programming - Upgrades - Marketing
www.netvisionwebdesign.com

Follow on twitter: http://twitter.com/netvisionweb
Become a fan on Facebook: http://www.facebook.com/pages/NetVision-Web-Design/89463493419
Reply With Quote
  #18  
Old 05-29-2004, 04:19 PM
 
jeeya jeeya is offline
 

X-Adept
  
Join Date: May 2003
Location: USA
Posts: 807
 

Default

I am getting this error after I add - specials.php in home.php



INVALID SQL: 1054 : Unknown column 'discount' in 'where clause'
SQL QUERY FAILURE: SELECT * FROM xcart_products,xcart_pricing WHERE forsale='Y' AND avail>0 AND xcart_products.productid=xcart_pricing.productid AND discount > 0 ORDER BY RAND() LIMIT 6


Version 3.4.0
__________________
X-Cart Version 4.1.8
Hosted on Linux
Reply With Quote
  #19  
Old 05-30-2004, 12:37 AM
  enge919's Avatar 
enge919 enge919 is offline
 

Senior Member
  
Join Date: May 2003
Posts: 141
 

Default

just change the following code in specials.php

Code:
<? // the database query $query = "SELECT * FROM $sql_tbl[products],$sql_tbl[pricing] WHERE forsale='Y' AND avail>0 AND $sql_tbl[products].productid=$sql_tbl[pricing].productid AND discount > 0 ORDER BY RAND() LIMIT 6 "; // give the product array to smarty to make it available sitewide. $specials = func_query($query); $smarty->assign("specials",$specials); ?>

to

Code:
<? // the database query $query = "SELECT * FROM $sql_tbl[products],$sql_tbl[pricing] WHERE forsale='Y' AND avail>0 AND $sql_tbl[products].productid=$sql_tbl[pricing].productid ORDER BY RAND() LIMIT 6 "; // give the product array to smarty to make it available sitewide. $specials = func_query($query); $smarty->assign("specials",$specials); ?>

This will just randomly pull products from the database regardless of any discounts.

And if you only want to show products you have discounted from the list price use this:

Code:
<? // the database query $query = "SELECT * FROM $sql_tbl[products],$sql_tbl[pricing] WHERE forsale='Y' AND avail>0 AND $sql_tbl[products].productid=$sql_tbl[pricing].productid AND price < list_price ORDER BY RAND() LIMIT 4 "; // give the product array to smarty to make it available sitewide. $specials = func_query($query); $smarty->assign("specials",$specials); ?>

Change LIMIT 6 to any number of products you want to show in the specials.tpl

Also be sure to name the specials template specials.tpl. I noticed in the original code it was named special.tpl.

I have tested this in 3.5.4 and works like a charm

hth
__________________
Web site design - Custom Programming - Upgrades - Marketing
www.netvisionwebdesign.com

Follow on twitter: http://twitter.com/netvisionweb
Become a fan on Facebook: http://www.facebook.com/pages/NetVision-Web-Design/89463493419
Reply With Quote
  #20  
Old 05-30-2004, 02:27 AM
 
jeeya jeeya is offline
 

X-Adept
  
Join Date: May 2003
Location: USA
Posts: 807
 

Default

Great Thanks Works Perfect.

Also Is there anyway to modify this to be shown on help section page - like about us page.
__________________
X-Cart Version 4.1.8
Hosted on Linux
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 06:16 AM.

   

 
X-Cart forums © 2001-2020