Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Help me understand catagories.php?


Nancy

Recommended Posts

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

Link to comment
Share on other sites

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)

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...