Jump to content

Archived

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

drunknbass

IF statement driving me nuts.

Recommended Posts

k im developing an oscommerce site, and most people on thier dont really get into hacking up the code and are mostly new to php and follow the cookie cutter sites, so im posting here :P

i am ging nuts on this last page i cant get to work right.
basically .....


theres a } in the wrong place, i moved it on accident a long time back in the coding phase and im lost nw.
bsically if there are no attributes the page stops displaying data after the name and desc.
like this
[a href=\"http://www.enveamerica.com/product_info.php?cPath=135&products_id=77\" target=\"_blank\"]http://www.enveamerica.com/product_info.ph...&products_id=77[/a]
with attributes
[a href=\"http://www.enveamerica.com/product_info.php?cPath=135&products_id=79\" target=\"_blank\"]http://www.enveamerica.com/product_info.ph...&products_id=79[/a]

and if thier are attributes itll display everything..
so i think cause the } being n the wrong place some important stuff like add to cart , price, etc are getting stuck in the IF statement that checks if there are variables for attributes.

normally it wouldnt be that hard but every logical place i put the } either destroys the page structure or doesnt have the right effect. i HAD it working but by accident i went to a product that was unavalable and it destroyed the structure. thats how i stumbled accross the mixup.
so this page needs to display correct also (random invalid product id)
[a href=\"http://www.enveamerica.com/product_info.php?cPath=135&products_id=7656464\" target=\"_blank\"]http://www.enveamerica.com/product_info.ph...ucts_id=7656464[/a]

PLEASE PLEASE PLEASEEEEE
SOMEONE WITH GOOD EYES HELP ME, ILL HOOK YOU UP WITH A PRODUCT!



for some reason it wont let me quote the code so heres a txt file with it
[a href=\"http://www.enveamerica.com/code.txt\" target=\"_blank\"]http://www.enveamerica.com/code.txt[/a]

Share this post


Link to post
Share on other sites
i can see whats happening on the site but we need to be able to see the code setion that your taling about. i can only view the html source not the php.

Share this post


Link to post
Share on other sites
[!--quoteo(post=372537:date=May 9 2006, 02:12 AM:name=Steady_Eddie)--][div class=\'quotetop\']QUOTE(Steady_Eddie @ May 9 2006, 02:12 AM) [snapback]372537[/snapback][/div][div class=\'quotemain\'][!--quotec--]
i can see whats happening on the site but we need to be able to see the code setion that your taling about. i can only view the html source not the php.
[/quote]
i uploaded it as a txt. for some reson i cant post it in this thread it keeps going to an error index page on this site. i think im going crosseyed ive been starring at my screen looking for }'s for hours.
look in my first post for the txt file.

Share this post


Link to post
Share on other sites
Please post a code in here, because your link does not work :(
To skip those errors in future with {}{}, use software such as ZEND which allows to open/close a piece of code starting with { and ending with }.

Share this post


Link to post
Share on other sites
wheres the code i got excited lol...................

How can someone help another when theres no posted code  and a dead link lol ...............

Share this post


Link to post
Share on other sites

×

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.