Forums / General Questions / Using Zencart Info Outside of the zencart Directory

Using Zencart Info Outside of the zencart Directory

Locked

Views: 1,578

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
28 Dec 2007, 5:48 PM
#1
thisandthat avatar

thisandthat

New Zenner

Join Date:
Dec 2007
Posts:
4
Plugin Contributions:
0

Using Zencart Info Outside of the zencart Directory

Hello to you all,

Hope you had a good Christmas.

I am a regular lurker on these forums but this the first time I've come up against a problem I can't seem to solve.

My issue is this.

I would like to have a website where the Zencart store is in its own sub-directory of the website. A very common set-up.

I therefore will have an entry page which is outside of the zencart folder. But what I would like is for certain information from the zencart directory to be used on this frontpage. Namely a section on the aforementioned entry page which has a selection of the latest products to the shop (like the new products list for the month, for example). I want all of this to change automatically so my client won't have to adjust the site outside of the zencart admin but will still have a auto updating site.

So I would like to be able to use the latest products images and data in a page outside of the zencart folder.

You may be asking why I don't just have the whole site in zencart and have entry page as the zencart index page. The reason for this is that I want the site outside of the shop section to have a different, more fluid layout which doesn't follow the template of the store, but yet incorporates elements of my choosing.

I hope this makes sense and that someone can bring some suggestions to the table.

I am not a PHP/MySql wizz by any means but have a basic understanding of what is what.

I am also fully prepared for the answer to this to be incredibly simple, but I'm having a classic "can't see the wood for the trees" moment.

I hope someone can help me out.

Cheers
T&T
xx

29 Dec 2007, 5:55 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: Using Zencart Info Outside of the zencart Directory

There is a "sidebox anywhere" contribution in the downloads area which could lend itself to the purposes you describe.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

29 Dec 2007, 3:06 PM
#3
thisandthat avatar

thisandthat

New Zenner

Join Date:
Dec 2007
Posts:
4
Plugin Contributions:
0

Re: Using Zencart Info Outside of the zencart Directory

Hello Dr Byte,

Thanks for your message and thanks for creating that module. Its a handy one.

But I don't think I explained myself enough.

I would like to use only the images and the stock info, I don't want the rest of the sidebox as I don't want to use the template that will exist within the store.

Fo example I would like the landing page of the site to show the latest four products all at the same time, rather then the sidebox single product.

But thank you for your suggestion, do you have any further advice or hints?

I don't want to appear disparaging about the module you've made, but its not quite what I need......picky swine that I am :blush:

Thanks again and any further help would be greatly appreciated.

T&T

29 Dec 2007, 3:44 PM
#4
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Using Zencart Info Outside of the zencart Directory

You should be able to use the code as a base to bring the info into your main site, and then pick it up and display it as you choose.

And you know, it is possible to have a different layout for specific pages, so unless you want functions that Zen Cart just doesn't do, you don't really need a separate main site.

29 Dec 2007, 3:58 PM
#5
thisandthat avatar

thisandthat

New Zenner

Join Date:
Dec 2007
Posts:
4
Plugin Contributions:
0

Re: Using Zencart Info Outside of the zencart Directory

Oh absolutely,

the main problem is that I'm not entirely sure which bits of code I need to show just the images and stock info and price in a seperate design and layout to the zencart template.

So ideally I would like to take the images and info of the four latest added products and place them within a seperate template of my own which I can apply different CSS rules etc to the code.

I fully understand that you can have seperate designs for each page using the same database info, its just that I can't figure out** which info I need** to display the stuff I want. I'm a PHP newbie so decoding some aspects of it is a little tricky....CSS ain't a problem its all the complicated stuff....ha....

T&T

29 Dec 2007, 4:12 PM
#6
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Using Zencart Info Outside of the zencart Directory

The sidebox code will not have any template or style within itself - it should output nothing more than a div with an id and some other divs with content inside it. It will pick up whatever styling you apply to it in your main site stylesheet. The part I don't know about is modifying the code to pick up four products instead of one - for that you will want DrByte's advice (or someone else knowledgeable about that aspect).

Have you installed the mod for a trial to see just what HTML it generates?

29 Dec 2007, 4:29 PM
#7
thisandthat avatar

thisandthat

New Zenner

Join Date:
Dec 2007
Posts:
4
Plugin Contributions:
0

Re: Using Zencart Info Outside of the zencart Directory

Of course,

and it installs the sidebox code direct from the zen template. Very nicely too.

But as you mentioned its not really the sidebox I want, per se. But I think Dr Byte has brought attention to the kind of thing I want....as for the sidebox, although it is outputted with CSS-less code the rules to the image size etc is defined by the admin control panel so making changes tricky.....

I will see if I hear back, either that or I'll have to hit the textbooks and figure it out for myself.

Thanks for your quick response!

T&T