Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Display selected products on a seperate page


roseoliveira1

Recommended Posts

Hello you people out there,

maybe one of you could help me with the following problem. Some weeks ago I installed osC, and slowly but surely I fight my way through code and contributions, add new links to new pages, and managed to adopt the original installation to my needs. But now I've reached a point where I am stuck.

 

What I have:

I want to sell art and art-related products. So I developed 2 product categories so far: paintings and books. Now, let's look at the paintings. Here we have different product attributes: painter, year, style, material (can be oil on canvas, or acrylic on wood, etc.), and so on (in order to include these product attributes, I installed the contribution "Product Extra Fields").

 

What I want:

From the homepage, by choosing the category "paintings", osC directs me to a page which is titled "Let's see what we have here" (this is the standard installation, i didn not change anything here). I don't know too much about webdevelopment, but from the URL of this page (.../category/index.php?cPath=21) it seems that this is not a "real", a "physical" page, but it rather seems that osC has done a search and displays the search results on the index.php. Now here are my questions:

(1) I want to add text and new links onto this page, but as ".../category/index.php?cPath=21" is not a "real" file in the osC-folders, how can I do this? Is it possible to substitute this (as far as I understand) temporary page with a physical .php-file which I can modify to my wishes? We could call this file paintings.php

(2) Let's imagine that I managed to create a file called paintings.php. Remember: I would reach paintings.php by clicking the category "paintings" on my homepage, right? Now, on paintings.php there will be some general information on the paintings for sale. Further, I want that the customer can choose between different styles (or materials, or ...) of paintings he wants to view on the following pages. Example: The customer is on the page paintings.php, where he can click the link "surrealism". He will then be directed to a page paintings_surrealism.php, where all the paintings in the database are displayed whose product attribute "style" ist "surrealism". Similarly, clicking the link "cubism" would lead him to the page paintings_cubism.php, where all cubist paintings in the database are displayed.

 

I hope this description was not too confusing :-" .

 

Anybody who can help me with this? I was so happy that I made the first steps in osC, but now I just don't know how to proceesd

 

Thanks in advance for any help,

 

Rose

Link to comment
Share on other sites

You can have your main category painting, and sub-categories e.g. surrealism, post-modernism, modernism cubism etc. but as you have guessed all these results are pulled from the database. But if someone clicks on a sub-category e.g. cubism then they will only get the 'cubism' images.

 

Your problem is in giving information about each different style and era of painting. This can be done by creating a new infobox e.g. Styles of Painting and adding some static pages to that box e.g. Surrealism, Cubism etc. where you can put information about the various styles of painting, and even some hard-coded links to specific images/products.

 

Vger

Link to comment
Share on other sites

You can have your main category painting, and sub-categories e.g. surrealism, post-modernism, modernism cubism etc. but as you have guessed all these results are pulled from the database.  But if someone clicks on a sub-category e.g. cubism then they will only get the 'cubism' images.

 

Your problem is in giving information about each different style and era of painting.  This can be done by creating a new infobox e.g. Styles of Painting and adding some static pages to that box e.g. Surrealism, Cubism etc. where you can put information about the various styles of painting, and even some hard-coded links to specific images/products.

 

Vger

 

Hello Vger,

thanks for the quick reply. You exactly understood what I want, and I sincerely thank you for taking your time to think about my problem. Let me comment on your suggestions and add an additional question:

I agree with you that I have to add links which refer the client to style-pages where I put background information on the specific style. You say that on these pages I could put "some hard-coded links to specific images/products". With "hard-coded link", do you mean that I have to write one link for each painting I want to display? Canyou tell me the linking-address to a product in my database? And just to make sure: I cannot display all paintings with "style=surrealism" through a search on the database (whereby i haven't got a clue how to program a search on the database)?

 

Maybe I should add one more bit of information: I decided not to create sub-categories, as this would inevitably lead to redundnacy. Let me give you an example: A painting by Dali could be be included in all of the following subcategories:

surrealism (a subcategory defining style), oil on canvas (defining material), subconscious (defining the theme of the picture), spain (the country) ... there are countless others. I therefore installed the Product Extra Fields and defined all these elements as attributes of the painting.

 

I thought I might better add this to the discussion in order to avoid that we talk about solutions which would not meet the reality of my shop.

 

Vger, thanks again for your suggestions. Maybe you can also help me with the new questions I asked above?

 

Thanks a lot,

 

Rose

Link to comment
Share on other sites

  • 2 weeks later...

If those new columns are enumerated or otherwise have a means of maintaining data consistency why not add an index on them and use as a filter? Sounds like a fairly easy modification...

 

Let's see if I understand this correctly -> you have only top level categories. Upon clicking the "paintings" category you would then like to use the extra columns to be a filter for display of products. So, if the filter is set for "surrealism" the display would only present products that have that entry in the associated extra column?

 

Bobby

Link to comment
Share on other sites

If those new columns are enumerated or otherwise have a means of maintaining data consistency why not add an index on them and use as a filter?  Sounds like a fairly easy modification...

 

Let's see if I understand this correctly -> you have only top level categories.  Upon clicking the "paintings" category you would then like to use the extra columns to be a filter for display of products.  So, if the filter is set for "surrealism" the display would only present products that have that entry in the associated extra column?

 

Bobby

 

thanks bobby for joining this discussion. but..."fairly easy modification" ... :'( ... . considering the number of contributions you have published, maybe for guys like you it's an easy modification, for me it isn't :(

Concerning your understanding of the problem: yes, you got it 100% right. Now, in my first post i reduced complexity a bit in order to make things easier to understand; in reality, there is one level of links more. so here is what i want to implement:

 

level 0: homepage: index.php. general text in the main area. 2 product categories to choose: paintings and books. Choosing a category brings us a level down. Let's look at painting.

 

level1: paintings.php. general text on paintings. presentation of featured products (should be possible to solve with the Featured Products Contribution). Links to specified pages on paintings: Style, Themes, Material, etc. let's look at style.

 

level2: style.php. general text on styles and links to specific styles: surrealism, cubism, impressionism, etc. maybe one example-painting per style. let's look at surrealism.

 

level3: surrealism.php. after an introductory text on surrealism, this is where the paintings are displayed and the customer can purchase the paintings. I assume this is where we have to serch the database and get all paintings which in the field "style" have the entry "surrealism" (remember that I defined these fields with the Product Extra Fields contribution).

 

Now, wizards and whiches of php (and sql i assume), is there any magic you can do to solve this one? It's been giving me headaches for two weeks and I just don't seem to get closer to a solution. any help is VERY welcome!

 

Rose

Link to comment
Share on other sites

Now I'm getting confused...I know you want to be able to the columns as a filter or selection criteria but I'm fuzzy on the particular scripts. Is the purpose of each simply to group the items by custom column?

 

How many products do you have? Can you post an SQL structure dump of your table with custom columns?

 

Bobby

Link to comment
Share on other sites

Now I'm getting confused...

 

Sorry about that! See, it's always difficult if people like me who don't know the correct technical terms try to communicate with an expert.

 

I know you want to be able to the columns as a filter or selection criteria but I'm fuzzy on the particular scripts.

 

I think I got you confused by giving names to the files on the different levels (is a .php-file what you call a "script"?). I assume I wrote "level1: paintings.php; level2: style.php; level3: surrealism.php" just in order to identify the different levels. I somehow assumed that I would need a "Physical" file on my server in order to achieve what I want to implement. So, let's put it this way:

Instead of "level1: paintings.php" we might sa?: "level1: here is info on paintings in general"

Instead of "level2: style.php" let's say "level2: here we put info on styles"

Instead of "level3: surrealism.php" we put "level3: Information on surrealsim and display of the paintings with style=surrealsim".

 

Is this better, or did I get you even more confused?

By the way: I have prepared a detailled concept of the website I am trying to implement, with a sitemap and all links. It's a powerpoint-presentation which I can send to anyone who might be interested; it might be easier to understand than my textual descriptions here on the forum.

 

Is the purpose of each simply to group the items by custom column?

 

yes, i think this is it. the third level should display the paintings by the style selected.

 

How many products do you have?  Can you post an SQL structure dump of your table with custom columns?

 

I'm not online yet, currently making my changes to the osC-standard installation on a test-server, but i'm just about to move to a "real" server. I should have URL by next week. At the moment I only have a few test products in the database, on the long term I won't have more than a few hundred products, maybe 1000.

 

If you can tell me what a SQL structure dump is and what I have to do to find it :'( , of course I will post it. Sorry, this question might sound a bit naive, but I'm really quite new to all this.

 

Bobby, I hope I could clarify your doubts.

Thanks for your posting,

Rose

Link to comment
Share on other sites

  • 4 weeks later...

I managed to get one step further towards a solution of my problem, but the stuff I did is probably against all rules of good programming. but as i cannot programm at all, i am quite happy that i managed to trick my computer to (partly) do what I want him to do :P .

 

There are two things which I would like to ask:

 

(1) Can anybody check what I did and give my his (or her...) opinion? As I said, i change stuff in osCommerce but really have no clue what I am doing, so I would like to know if what I did is only bad style or might also cause some kind of problem

 

(2) Is there anybody out there who can help me with the steps which are still missing to fully implement what I want to do?

 

 

Regarding Question 1:

Now, here is what I did:

I sell art. On the index.php I added new links which are supposed to guide the user to specific subgroups of products and provide him with information on those subgroups. So, if a customer wants to see which different styles we offer, he could click on the link "styles"; if he wants to see which different themes we have to offer, he clicks on the link "theme" ("Theme" refers to the theme depicted on a painting. This could be daily life, or historical scenes, or family life, or whatever).

Let's stay with the styles. A customer clicks the link "style" on the index.php and gets directed to a new page i created called art_styles.php. For this page art_styles.php I have created a seperate template with the sts_template system and included links to the different styles we have. So on the top of the page you have the buttons realism, abstract, surrealsim, and so on (these buttons are NOT on the index.php. similarly, if you click onto "themes", here you see the new buttons "daily life", "historical paintings", etc. These buttons are only on the page art_themes.php and nowhere else).

 

Ok, back to the art_styles.php. If a customer clicks onto th link "realism", I need to show him the page with all the realist paintings. As I haven't got a clue about programming a database search in SQL, i simply entered the term "realism" into the search box. As a result osC shows me all of my paintings which have the term "realism" in their database-field "style" (sorry - i should mention that I have the "product extra fields" contribution installed which adds new fields to the database.). The URL of this search result-page is

http://www.mystore.com/catalog/advanced_search_result.php?keywords=realism&x=2&y=2

 

So I just copied this URL and used it as a link destination for the button "realism" on the art_styles.php.

 

I hope you can still follow me! Probably very unorthodox what I did here. Cn anybody with some more programming experience than myselft comment on this approach?

 

Regarding question 2:

I am still struggling with the following problem. When the customer clicks the button "realism", he basically gets directed to the search results page. On this page, obviously, the buttons I had on the art_styles.php are not there anymore; but I would like to still have them there. Also, I would like to add some pecific text on the style "realism", but of course I cannot add that text on the advanced_search_result.php itself, otherwise it would appear everytime the customer does a search. Also, obviously I need a different text when i display surrealist paintings. To make it short: I need a way to display different text on the advanced_search_results.php, depending on the page the customer comes from.

This is a bit of a tricky problem I think.

Anybody out there who can help me with this?

 

Thanks,

Rose

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...