Jump to content

One link, multiple destinations that are defined? (newbie)


qxonn

Recommended Posts

Hi everyone.    I'm a very inexperienced PHP coder who is helping out on an ecommerce site (osCommerce 2.2).  :shrug:  We lost our main PHP guru and I'm trying to wondering if anyone can help point me in the right direction.   

 

At the bottom of every product page there is a link that goes to an index of forms that they can fill out for a quote.  We want to take the user to the correct form to help them save time from having to select the right one.  The "right one" depends on what product they are viewing at the time.    We have about 15 different forms for over 85,000 products. 

 

This is what we are thinking: create and assign each product a "product_form" in MySQL, and then define & assign that integer to the correct quote form.  When you click on the link it reads "product_form" and then loads the right form for whatever product page you where currently on.

 

Basically, I have a general theory and understanding that this way would be the easiest for us to implement (as far as the database and managing 85,000 products).  But I am open to other ideas.  I am completely ignorant in this so if you want to just forward me links to read about how to do this that would be a huge step in the right direction.  I think I could figure it out. 

 

Thanks!

Link to comment
Share on other sites

hmmm, 15 forms for 85,000 products. How is this form distinction decided? by category? by type? by country? something else? (there's gotta be something).

Imagine there is a category (or 15 in this case) it would be as easy as having the form files with the same name as the respective category. Really depends on what other data you have in each product.

 

 

Link to comment
Share on other sites

hmmm, 15 forms for 85,000 products. How is this form distinction decided? by category? by type? by country? something else? (there's gotta be something).

 

Yes, you are totally correct. Categories where considered but there are over 400 categories (it's a heavy industrial sales website in case you are wondering) and I thought creating a entirely unique entry in mysql would be the most flexible and straightforward.  My intention was to create a new "product_form" entry in the database that would be an integer of 1 - 15.    0 would take you to a generic form page.  I would have to do some mapping, but I'm not sure how.  Any examples of a process like this would be the most beneficial.  Even just the appropriate topic to search google with ;-)  :rtfm:

Link to comment
Share on other sites

You're pretty much going to have to do this manually.

 

 

You could declare the form type on the category page instead, and join it with the product query. This assumes all products in a given category will use the same form.

 

 

Otherwise, you'll have to assign a per-product value, and unless there's some information given in the table that would hint at the type of for a given product will have, it's all manual.

Link to comment
Share on other sites

Oddly enough, per product won't be an issue and are OK with the time it will take.  Without going into too much detail, we would appreciate the flexibility it would give us.

 

The issue for me is how to code it... I'm searching for examples and I have a few books but I'm just too newb... 

 

Thanks for your replies guys, it makes me feel good that I am headed in the right direction with what needs to be accomplished.  Maybe I just go hire someone ;-)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.