X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Adding 'Search for Events' on the homepage (https://forum.x-cart.com/showthread.php?t=34862)

pjsimonetta 10-23-2007 07:07 PM

Adding 'Search for Events' on the homepage
 
I want to be able to add the 'Search for Events' form from the gift registry add-on to the home page, in the middle area above featured products.

Is there a way to include this and how?

Thanks,
Simonetta

balinor 10-24-2007 04:36 AM

Re: Adding 'Search for Events' on the homepage
 
Welcome to the X-Cart forums! Please start by reading the following thread, which will help you get started and hopefully make your experience here a positive one:

http://forum.x-cart.com/showthread.php?t=23970

Please note that this link is not an answer to your question, but we need you to update your signature with your X-Cart version so that we can answer your question correctly. Thanks! :)

pjsimonetta 10-24-2007 04:40 AM

Re: Adding 'Search for Events' on the homepage
 
Signature updated

balinor 10-24-2007 04:42 AM

Re: Adding 'Search for Events' on the homepage
 
Thanks! So just open up skin1/customer/main/welcome.tpl and add the link wherever you want.

pjsimonetta 10-24-2007 04:46 AM

Re: Adding 'Search for Events' on the homepage
 
So will this add the form or the entire page I want the actual form to be displayed on the front page. Doesn't 'giftregs.php' display the whole site as well as the 'search for events' form?
Thanks

balinor 10-24-2007 04:55 AM

Re: Adding 'Search for Events' on the homepage
 
You can add the whole form (not the php file) to the template if you wish, yes.

pjsimonetta 10-24-2007 05:05 AM

Re: Adding 'Search for Events' on the homepage
 
So where do I get the form from? giftreg.php? and if so what part of the code do I copy into welcome.tpl

require "./auth.php";

if (empty($active_modules["Gift_Registry"]))
func_header_location("error_message.php?page_not_f ound");

x_session_register("access_status", array());


if ($mode == "preview") {
$html_content = func_query_first_cell("SELECT html_content FROM $sql_tbl[giftreg_events] WHERE event_id='$eventid'");
if (!empty($html_content))
echo $html_content;
else
echo "<br /><br /><br /><br /><h3 align=\"center\">".func_get_langvar_by_name("lbl_n o_html_content",false,false,true)."</h3>";
exit;
}

include $xcart_dir."/include/categories.php";

if($active_modules["Manufacturers"])
include $xcart_dir."/modules/Manufacturers/customer_manufacturers.php";

if (!empty($cc)) {
#
# Confirm/Decline the participation by recipient
# $cc - is a confirmation code passed via GET request
#
include $xcart_dir."/modules/Gift_Registry/giftreg_confirm.php";
}

if (!empty($eventid)) {

if (!empty($wlid)) {
if (func_query_first_cell("SELECT COUNT(*) FROM $sql_tbl[giftreg_events] WHERE MD5(login)='$wlid' AND event_id='$eventid'")) {
x_session_register("wlid_eventid");
$wlid_eventid = $eventid;
x_session_save("wlid_eventid");
}
}

include $xcart_dir."/modules/Gift_Registry/event_guestbook.php";
include $xcart_dir."/modules/Gift_Registry/giftreg_display.php";
}
else
include $xcart_dir."/modules/Gift_Registry/giftreg_search.php";

# Assign the current location line
$smarty->assign("location", $location);

func_display("customer/home.tpl",$smarty);
?>

balinor 10-24-2007 05:11 AM

Re: Adding 'Search for Events' on the homepage
 
Ok, in X-Cart, you never really need to touch the php. All of the files you need are in the templates. For the gift registry, all of the files are in the skin1/modules/Gift_Registry folder. Simply use Webmater Mode to find out which template you are looking for, and then open that template to see the form code for the part you are looking for. May want to read this thread to give you some guidance on the template system in X-Cart:

http://forum.x-cart.com/showthread.php?t=21529

pjsimonetta 10-24-2007 05:27 AM

Re: Adding 'Search for Events' on the homepage
 
Thank you I got the form on the front page. So you need to find the html somewhere in the template pages and add them to other template pages and so on?

balinor 10-24-2007 05:28 AM

Re: Adding 'Search for Events' on the homepage
 
All of the html is in templates, yes.


All times are GMT -8. The time now is 04:13 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.