Jump to content



Latest News: (loading..)

- - - - -

Help me understand catagories.php?


This topic has been archived. This means that you cannot reply to this topic.
2 replies to this topic

#1   Nancy

Nancy
  • Members
  • 23 posts

Posted 28 September 2002 - 03:32 AM

tep2.1
Hey all, I've solved my own problem (posted earlier in the week), but I don't really understand why what I did worked and why what I was doing wouldn't work.

I wanted to add some additional fields to the products and I had everthing working fine except when I would go back to edit a product, the additional fields wouldn't be populated with the information from the database.  Only the new field I added was affected.  I was duplicating existing code when generating text boxes and that didn't work.  For example this is original code:
<input type="text" name="products_quantity" value="<? echo @$pInfo->quantity; ?>">
so I did this and it didn't work
<input type="text" name="products_contact_id" value="<? echo @$pInfo->contact_id; ?>
But this did work
<input type="text" name="products_contact_id" value="<? echo $product['products_contact_id']; ?>

Why didn't the logical solution work while a stab in the dark did work? It's not important, it just bugs me.

TIA
-nan

#2   Mark Evans

Mark Evans

    Code Monkey Rockstar

  • Core Team
  • 2,516 posts

Posted 28 September 2002 - 10:18 AM

Quote

Why didn't the logical solution work while a stab in the dark did work? It's not important, it just bugs me.

Did you add your products_contact_id to the product_info.php class which can be found in admin/includes/classes :)
Mark Evans
osCommerce Monkey & Lead Guitarist for "Sparky + the Monkeys" (Album on sale in all good record shops)

---------------------------------------
Software is like sex: It's better when it's free. (Linus Torvalds)

#3   Nancy

Nancy
  • Members
  • 23 posts

Posted 28 September 2002 - 01:37 PM

No, I didn't.  That would explain it.  I'm glad I took the the time to ask and really glad you took the time to answere.  I had a working solution, but it was incorrect and would have possible caused me problems further on down the information super highway :oops:
Thank you very much!
-nan