Jump to content


Photo

IF statement driving me nuts.


  • Please log in to reply
5 replies to this topic

#1 drunknbass

drunknbass
  • New Members
  • Pip
  • Newbie
  • 8 posts

Posted 09 May 2006 - 09:07 AM

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]

#2 eddedwards

eddedwards
  • Members
  • PipPipPip
  • Advanced Member
  • 31 posts

Posted 09 May 2006 - 09:12 AM

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.

#3 drunknbass

drunknbass
  • New Members
  • Pip
  • Newbie
  • 8 posts

Posted 09 May 2006 - 10:00 AM

[!--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) View Post[/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.

#4 Advancewebsoft

Advancewebsoft
  • New Members
  • Pip
  • Newbie
  • 8 posts

Posted 01 July 2006 - 11:38 PM

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 }.
Best,
Advance Team
Official site http://www.advancewebsoft.com
Oscommerce Solutions: http://www.advancewe...oscommerce.html

#5 Drumminxx

Drumminxx
  • Members
  • PipPipPip
  • Advanced Member
  • 92 posts
  • LocationUSA

Posted 02 July 2006 - 03:10 AM

http://www.enveamerica.com/code.txt

doesn't exists
:: gucci.com ::
:: blockbuster.com ::

--------------------

#6 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 02 July 2006 - 03:15 AM

wheres the code i got excited lol...................

How can someone help another when theres no posted code  and a dead link lol ...............
Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users