Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Javascript for each iteam


jojotaz

Recommended Posts

Howdy~

Can I have a javascript that works for one item but then use a different javascript for a differnt item? If so which file and where abouts do I go about doing that?

 

Thanks

Link to comment
Share on other sites

hi, a bit more info here ... is this for the products description? if each js is different, you could add them to the description

:-)

Monika

 

addicted to writing code ... can't get enough of databases either, LOL!

 

my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum

 

Interactive Media Award July 2007 ~ category E-Commerce

my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...

Link to comment
Share on other sites

hi, a bit more info here ... is this for the products description? if each js is different, you could add them to the description

 

Howdy~

What I am trying to do is, where the pulldown menus for the attributes are when you are viewing a product, I am trying to add some javascript that I have setup, but some of the products do not use the same javascript. Does that help?

 

Thanks

Link to comment
Share on other sites

nope, need more info about that js/attribute connection, and what it does

:-)

Monika

 

addicted to writing code ... can't get enough of databases either, LOL!

 

my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum

 

Interactive Media Award July 2007 ~ category E-Commerce

my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...

Link to comment
Share on other sites

Howdy~

Well see if this helps. I have a javascript setup that will control the attributes based on what the previous attribute is selected.

Lets say I have three attributes for two different products,

 

Product one:

you can either pick option "a" or "b"

when you select "a" the options for the second attribute is "a" and "b"

when you select "b" the opiions for the second attribute is "1" and "2"

and the third attribute is based on the second attribute that is selected

 

Product two:

you can either pick option "1" or "2"

when you select "a" the options for the second attribute is "y" and "z"

when you select "b" the opiions for the second attribute is "8" and "9"

and the third attribute is based on the second attribute that is selected

 

Does that help?

 

Thanks

Link to comment
Share on other sites

almost. Will you be addressing the drop down selected index by ID, and did you try adding the js at the top of the products description?

:-)

Monika

 

addicted to writing code ... can't get enough of databases either, LOL!

 

my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum

 

Interactive Media Award July 2007 ~ category E-Commerce

my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...

Link to comment
Share on other sites

Howdy~

Sorry I have been out of town for work but am back nowq. Yes I will address the menus by the product id. I am not sure where to put he js as it relates to the product descriptions.

 

Thanks

Link to comment
Share on other sites

I have done similar things. I created an extra js file with all functions and included it in the header of product_info.php

 

This does not relate to the description, but to the attribute dropdowns, so the function calls will have to be there (on change of the dropdown values)

:-)

Monika

 

addicted to writing code ... can't get enough of databases either, LOL!

 

my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum

 

Interactive Media Award July 2007 ~ category E-Commerce

my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...

Link to comment
Share on other sites

I have done similar things. I created an extra js file with all functions and included it in the header of product_info.php

 

This does not relate to the description, but to the attribute dropdowns, so the function calls will have to be there (on change of the dropdown values)

 

Howdy~

Can you show me an example of something that you had done?

 

Thanks

Link to comment
Share on other sites

you can PM me for the link. My client would not want to be posted on a forum ...

:-)

Monika

 

addicted to writing code ... can't get enough of databases either, LOL!

 

my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum

 

Interactive Media Award July 2007 ~ category E-Commerce

my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...