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

Newest Products

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #71  
Old 11-17-2004, 02:05 PM
  finestshops's Avatar 
finestshops finestshops is offline
 

eXpert
  
Join Date: Oct 2002
Location: Toronto, Canada
Posts: 335
 

Default

Try this:

add in customer/home_main.tpl

Code:
{elseif $main eq "newest"} {include file="customer/main/newest.tpl"}

in newest.php

at the beginning add

Code:
require "./auth.php";

and at the end:

Code:
$smarty->assign("main","newest"); $smarty->display("customer/home.tpl");

do not forget to remove

Code:
require "./newest.php";

from home.php

now try to run http://www.domain.com/store/newest.php
Should work if I did not miss something

Or just order this mod here:
http://www.shopping-carts-upgrades.com/Newest-Products-Added-p-91.html

and we'll set it up this way.
__________________
Best regards,

Anton Pachkine
finestshops.com/x-cart
Reply With Quote
  #72  
Old 11-22-2004, 05:29 AM
 
josu josu is offline
 

Advanced Member
  
Join Date: Oct 2004
Location: Bilbao Spain
Posts: 38
 

Default Not working newest.php

I have created the newest.php and do the modifications indicated, but I can not see the new products...
__________________
Xcart 4.1.8 gold
Looking for other spain developers
Reply With Quote
  #73  
Old 11-28-2004, 10:40 AM
 
earion earion is offline
 

Newbie
  
Join Date: Nov 2004
Posts: 2
 

Default

i've tried to lok for a solution to this problem on my own but i'm not a sql guy... i need in my first page a newest products modules except it has to be on 3 columns and each column is a different category.
I think i know how it would work : each column is displayed like in the store and using the add_date we can narrow it down to say 5 or 10 products ordered by add_date. Can you guys help me out ?
Thanks in advance !
__________________
-earion - running X-cart 4.07
Reply With Quote
  #74  
Old 12-20-2004, 11:24 AM
 
rapsearch rapsearch is offline
 

Advanced Member
  
Join Date: Nov 2004
Posts: 47
 

Default

I would be very interested in the ^ as well... Can anyone help out with this for the x-cart generation 4?

(wonderes why this is not default in x-cart....)
__________________
Version: 4.1.10
Server: Apache/mysql
Location: http://www.rapsearch.com/store
Reply With Quote
  #75  
Old 12-24-2004, 02:11 PM
 
pcdoktorn pcdoktorn is offline
 

Member
  
Join Date: Dec 2004
Posts: 22
 

Default

Seems this mod is not working in 4.0.8
I get an error saying
Parse error: parse error, unexpected T_USE in /home/www/www/pcdoktorn/newest.php on line 27
__________________
Version 4.0.9
Reply With Quote
  #76  
Old 01-10-2005, 07:31 PM
  eaglemobiles's Avatar 
eaglemobiles eaglemobiles is offline
 

Senior Member
  
Join Date: Jan 2005
Posts: 167
 

Default

is it working in 4.0.9

Thanks
__________________
X-Cart Gold 4.3.2
X-Cart Gold 4.4.1
Unix

High Quality CCTV DVRs & Cameras
http://www.eaglemobiles.co.uk/CCTV
Reply With Quote
  #77  
Old 01-12-2005, 06:53 AM
  shishapipe's Avatar 
shishapipe shishapipe is offline
 

Advanced Member
  
Join Date: Dec 2004
Location: London
Posts: 47
 

Default

Cant get it to work on x-cart 4.09

This works ok http://www.shisha.co.uk/shopcart/newest.php
but when i use http://www.shisha.co.uk/shopcart/home.php

I get the NEW blue bar at the bottom but no products

Any ideas, i have followed the postings, but cant find the problem.

I Know that the code for x-cart 4.09 in shopcart/skin1/customer/main/welcome.tpl is working fine

Code:
{* $Id: welcome.tpl,v 1.23 2004/05/28 12:21:00 max Exp $ *} <TABLE border="0" cellpadding="0" cellspacing="0" width="100%"> <TR> <TD height="19" class="WelcomeTitle" background="{$ImagesDir}/custom/welcome_title_bottom_bg.gif" valign="top"> {if ($active_modules.Greet_Visitor ne "") AND ($smarty.cookies.GreetingCookie ne "")} {$lng.lbl_welcome_back}, {$smarty.cookies.GreetingCookie|replace:"\'":"'"} {else} {$lng.lbl_welcome_to} { $config.Company.company_name } {/if} </TD> </TR> <TR> <TD>[img]{$ImagesDir}/spacer.gif[/img]</TD> </TR> <TR><TD class="WelcomeBox" background="{$ImagesDir}/custom/welcome_bg.gif"><TABLE border="0" cellpadding="5" cellspacing="10"> <TR> <TD valign="top">[img]{$ImagesDir}/custom/welcome_image.gif[/img]</TD> <TD class="WelcomeBox">{$lng.txt_welcome} </TD></TR> </TABLE></TD></TR> </TABLE> {*capture name=dialog} {$lng.txt_welcome} {/capture} {if ($active_modules.Greet_Visitor ne "") AND ($smarty.cookies.GreetingCookie ne "")} {include file="dialog.tpl" title="`$lng.lbl_welcome_back`, `$smarty.cookies.GreetingCookie`" content=$smarty.capture.dialog extra="width=100%" dialog_box_color="_orange"} {else} {include file="dialog.tpl" title="`$lng.lbl_welcome_to` `$config.Company.company_name`" content=$smarty.capture.dialog extra="width=100%" dialog_box_color="_orange"} {/if*} {if $active_modules.Bestsellers ne "" and $config.Modules.bestsellers_menu ne "Y"} {include file="modules/Bestsellers/bestsellers.tpl"} {/if} {include file="customer/main/featured.tpl" f_products=$f_products dialog_title_color="_orange"} {include file="customer/main/newest.tpl" newproducts=$newproducts dialog_title_color="_orange"}

I know that the shopcart/newest.php works fine.

So all i need to check now is the:
shopcart/home.php modification
shopcart/skin1/customer/home_main.tpl modification
shopcart/skin1/customer/main/newest.tpl modification
__________________
Regards Maxking

SERVER: Microsoft-IIS/5.0
MYSQL Server: 4.0.18-NT
PERL: 5.006001
PHP: 4.3.6
X-CART pro: 4.3
X-AOM: 4..3
X-RMA: 4..3X-FancyCategories 4.3
Skin: Own Design
Marketing Manager Professional 3.0 Bundle
Reply With Quote
  #78  
Old 01-12-2005, 08:05 AM
  shishapipe's Avatar 
shishapipe shishapipe is offline
 

Advanced Member
  
Join Date: Dec 2004
Location: London
Posts: 47
 

Default

Also checked the shopcart/skin1/customer/home_main.tpl (x-cart 4.09)

And that is OK

Code:
{if $smarty.get.mode eq "subscribed"} {include file="main/subscribe_confirmation.tpl"} {elseif $smarty.get.mode eq "unsubscribed"} {include file="main/unsubscribe_confirmation.tpl"} {elseif $main eq "returns"} {include file="modules/RMA/returns.tpl"} {elseif $main eq "register"} {include file="customer/main/register.tpl"} {elseif $main eq "download"} {include file="modules/Egoods/main.tpl"} {elseif $main eq "send_to_friend"} {include file="customer/main/send_to_friend.tpl"} {elseif $main eq "pages"} {include file="customer/main/pages.tpl"} {elseif $main eq "manufacturers_list"} {include file="modules/Manufacturers/customer_manufacturers_list.tpl"} {elseif $main eq "manufacturer_products"} {include file="modules/Manufacturers/customer_manufacturer_products.tpl"} {elseif $main eq "search"} {include file="customer/main/search_result.tpl"} {elseif $main eq "advanced_search"} {include file="customer/main/search_result.tpl"} {elseif $main eq "cart"} {include file="customer/main/cart.tpl"} {elseif $main eq "comparison" && $active_modules.Feature_Comparison ne ''} {include file="modules/Feature_Comparison/comparison.tpl"} {elseif $main eq "choosing" && $active_modules.Feature_Comparison ne ''} {include file="modules/Feature_Comparison/choosing.tpl"} {elseif $main eq "wishlist"} {if $active_modules.Wishlist ne ""} {include file="modules/Wishlist/wishlist.tpl"} {/if} {elseif $main eq "anonymous_checkout"} {include file="customer/main/anonymous_checkout.tpl"} {elseif $main eq "order_message"} {include file="customer/main/order_message.tpl"} {elseif $main eq "checkout"} {include file="customer/main/checkout.tpl"} {elseif $main eq "product"} {include file="customer/main/product.tpl" product=$product} {elseif $main eq "giftcert"} {include file="modules/Gift_Certificates/giftcert.tpl"} {elseif $main eq "subscriptions"} {include file="modules/Subscriptions/subscriptions.tpl"} {elseif $main eq "catalog" and $current_category.category eq ""} {include file="customer/main/welcome.tpl" f_products=$f_products} {elseif $main eq "catalog"} {include file="customer/main/subcategories.tpl" cat=$cat} {elseif $active_modules.Gift_Registry ne "" and $main eq "giftreg"} {include file="modules/Gift_Registry/giftreg_common.tpl"} {elseif $main eq "product_configurator"} {include file="modules/Product_Configurator/pconf_common.tpl"} {elseif $main eq "secure_login_form"} {include file="customer/main/secure_login_form.tpl"} {elseif $main eq "news_archive"} {include file="modules/News_Management/news_archive.tpl"} {elseif $main eq "change_password"} {include file="customer/main/change_password.tpl"} {elseif $main eq "customer_offers"} {include file="modules/Special_Offers/customer/offers.tpl"} {elseif $main eq "customer_bonuses"} {include file="modules/Special_Offers/customer/bonuses.tpl"} {elseif $main eq "newest"} {include file="customer/main/newest.tpl"} {else} {include file="common_templates.tpl"} {include file="customer/main/welcome.tpl" f_products=$f_products newproducts=$newproducts} {/if}
__________________
Regards Maxking

SERVER: Microsoft-IIS/5.0
MYSQL Server: 4.0.18-NT
PERL: 5.006001
PHP: 4.3.6
X-CART pro: 4.3
X-AOM: 4..3
X-RMA: 4..3X-FancyCategories 4.3
Skin: Own Design
Marketing Manager Professional 3.0 Bundle
Reply With Quote
  #79  
Old 01-12-2005, 08:10 AM
  shishapipe's Avatar 
shishapipe shishapipe is offline
 

Advanced Member
  
Join Date: Dec 2004
Location: London
Posts: 47
 

Default

Also checked shopcart/skin1/customer/main/newest.tpl (x-cart 4.09)

And this is ok, so its got to be something in the shopcart/home.php file

Code:
{* $Id: newest.tpl,v 1.13 2002/05/20 06:55:20 lucky Exp $ *} {capture name=dialog} {if $newproducts ne ""} {include file="customer/main/products.tpl" products=$newproducts featured="Y"} {else} {$lng.txt_no_new} {/if} {/capture} {include file="dialog.tpl" title=$lng.lbl_new_products content=$smarty.capture.dialog extra="width=100%"}
__________________
Regards Maxking

SERVER: Microsoft-IIS/5.0
MYSQL Server: 4.0.18-NT
PERL: 5.006001
PHP: 4.3.6
X-CART pro: 4.3
X-AOM: 4..3
X-RMA: 4..3X-FancyCategories 4.3
Skin: Own Design
Marketing Manager Professional 3.0 Bundle
Reply With Quote
  #80  
Old 01-14-2005, 01:17 PM
 
roccons roccons is offline
 

Member
  
Join Date: Nov 2004
Posts: 16
 

Default

First of all
thanks for the great mod!
I installed it yesterday and runs pretty well both as a welcome page and as a newest.php linkeable page.
I'm interested in being able to show the result of newest products in several pages.
I know I need to do something related with the products_per_page variable but don't know how or where.
Here is my newest.tpl code:
Code:
{* $Id: newest.tpl,v 1.13 2002/05/20 06:55:20 lucky Exp $ *} {*sцЁlo si el template es llamado desde newest_display.php muestra la barra location*} {if $main eq "newest"} {include file="location.tpl" last_location=$lng.lbl_new_products} {/if} {capture name=dialog} {if $newproducts ne ""} {include file="customer/main/products.tpl" products=$newproducts} {else} {$lng.txt_no_new} {/if} {/capture} {include file="dialog.tpl" title=$lng.lbl_new_products content=$smarty.capture.dialog extra="width=100%"}
And here is my newest_display.php code:
Code:
<? //para que pueda presentarse sola require "./auth.php"; require $xcart_dir."/include/categories.php"; if (!empty($cat)) require "./products.php"; // set variables $daterange = 9000000; // (60*60*24=86400)*(nц╨mero de dц╜as) ej. 7 dц╜as = 86400*7 = 604800 unix time $nowtime = time(); $oldtime = $nowtime - $daterange ; // 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 add_date > " . $oldtime . " AND add_date < " . $nowtime . " ORDER BY xcart_products.productID DESC LIMIT 0,12 "; // change the LIMIT 0,x above to indicate max number of items // give the product array to smarty to make it available sitewide. $newproducts = func_query($query); $smarty->assign("newproducts",$newproducts); //para que pueda presentarse sola $smarty->assign("main","newest"); $smarty->display("customer/home.tpl"); ?>
Any ideas?
Thanks in advance.
__________________
x-cart 3.5.12 (Unix)
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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:36 PM.

   

 
X-Cart forums © 2001-2020