Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Can this be done?


tuppergirl

Recommended Posts

Hello all,

 

This is something I like to try out...

 

By Osc default, all products share the same layout from product_info.php, which is product description text, product image on the right and two buttons(review and Buy now).

 

Let's say in Product A. I want the Osc default information + product special features + product history with a different layout.

 

In Product B, I want the default info + product history only with another different layout.

 

I tried to search the contributions for it but to no avail. I'm sure it can be done and is fairly easy for the veterans but I don't know where to begin as I'm fairly new to php and mysql. Is there a similar contribution that I can download to learn to modify to what I want? or anyone can kindly guide me with the steps I needed to get it done? Thanks

Link to comment
Share on other sites

Hi, can anyone help with this? Thanks

 

Tupper,

 

You might take a look at the STS and BTS template contributions to see how they approached this. I don't know either of them but I assume they are based on tags which pull one or the other part into osC.

If I would want something like you are looking for my approach would probably be like this:

- add a field to the products database where I can define a template file to be used with that specific product (ie. product_info_basic.php for the default layout, product_info_special1.php for a different layout etc.)

- strip the stock osC product_info.php from those parts I want to show dynamically and replace that with an include to the template php-file you defined with each product.

- create the seperate product template files

 

Basicly that should be it.

A simpler approach might be to add a tag to your product definitions and change the default product_info.php so it will show those parts you want or not want based upon those tags.

Hope this gives you some idea(s)

 

regards,

Howard

Link to comment
Share on other sites

Hey there Tupper,

 

STS will allow individual product_info displays. You may want to forego using the actual tags and just copy in the osc product_info then rework the display for each.

 

Iggy

Everything's funny but nothing's a joke...

Link to comment
Share on other sites

Thanks for the help.

 

Iggy> I have installed quite a number of admin contributions and they don't work easily with STS. The codes are too much a challenge for me(a php newbie) to merge with STS. I've tried that but I gave up.

 

Are there alternative ways?

 

 

Howard> I'll try your suggestion and hopefully I'm able to get it done.

 

Thanks

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...