Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Can you do an include on the frontpage of your website?


Guest

Recommended Posts

I want to add an include to the front page of my domain. I have featured products that I would like for people to see on my main site before ever going into my /catalog. Is this possible?

 

 

Thanks,

Luke

Link to comment
Share on other sites

Hi Yes it is possible, I do it in 3 ways,

 

1) I have an iframe that I include on the front page (global shopping cart) not always Ideal ..

 

2) I just use php and run a select query on the shop db selecting whatever I need and take it from there or

 

3) the nicest way for me personally is to create a file say, featured_rss.php based on rss.php modify the select query to select all your featured products, and then I use something like this for php to access the xml data, and format it to what I need

 

$dom = new DomDocument();
$dom->load("articles.xml");

 

see this page for a tutorial, http://devzone.zend.com/node/view/id/1713

 

Good Luck!! once you get this right your shop will take over your whole website, you'll want to sneak products in everywhere :D

Riaan

3am.co.za

 

I want to add an include to the front page of my domain. I have featured products that I would like for people to see on my main site before ever going into my /catalog. Is this possible?

Thanks,

Luke

I'm an osCommerce Pimp ..

Link to comment
Share on other sites

Thanks for your reply but I still don't think this is quite what I need. I have a domain site with a link to a catalog store, but I want a featured product to display on my domain.

 

For example: mysite.com is the link where I have a Home, Links, Contacts, Our Services, OUR PRODUCTS.

 

 

When the customer would click our products it takes you to mysite.com/catalog where the store is.

 

What I need is a php include to show just the "featured products" box inside a table on mysite.com homepage. I know there isn't just an easy include like:

 

<?php include '/catalog/includes/boxes/specials.php' ?>

 

My retarded self already tried that and failed miserably. Is there another code that I can do or do I need to go through the steps that star3am has posted?

Link to comment
Share on other sites

Thanks for your reply but I still don't think this is quite what I need. I have a domain site with a link to a catalog store, but I want a featured product to display on my domain.

 

For example: mysite.com is the link where I have a Home, Links, Contacts, Our Services, OUR PRODUCTS.

When the customer would click our products it takes you to mysite.com/catalog where the store is.

 

What I need is a php include to show just the "featured products" box inside a table on mysite.com homepage. I know there isn't just an easy include like:

 

<?php include '/catalog/includes/boxes/specials.php' ?>

 

My retarded self already tried that and failed miserably. Is there another code that I can do or do I need to go through the steps that star3am has posted?

 

I think I have what you are looking for, look at my site and look at the college denim box on the right

www.bethelwholesale.com

Link to comment
Share on other sites

I appreciate your response, but this isn't what I'm talking about. I'm talking about an index site that is NOT in my catalog site.

 

www.mysite.com/catalog/ <--- that is my catalog directory, but I want an include from that to point to my homepage which is

 

www.mysite.com

 

I think Star3am had it right when he said "I just use php and run a select query on the shop db selecting whatever I need and take it from there"

 

But I'm not sure exactly how to do that.

 

 

Thanks again!!

Luke

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...