itsgraham Posted February 3, 2007 Share Posted February 3, 2007 Hi I am trying to add the product weight so it appears directly under the price on the product info page ( actually I am trying to show the postage but I am using a hack that changed the weight field in the db :) ) I know very little about php and am hitting my head against the wall, I am entering variations of <br>$weight after the $price but I either get nothing showing or the code itself. help appreciated :) Link to comment Share on other sites More sharing options...
Chris Dunning Posted February 3, 2007 Share Posted February 3, 2007 You'll need to check the query to make sure it's pulling the products_weight from the database (I don't think it does on that page) and then echo something like $product_info['products_weight'] where you want the weight to show. Chris Dunning osCommerce, Contributions Moderator Team Please do not send me PM! I do not read or answer these often. Use the email button instead! I do NOT support contributions other than my own. Emails asking for support on other people's contributions will be ignored. Ask in the forum or contact the contribution author directly. Link to comment Share on other sites More sharing options...
itsgraham Posted February 3, 2007 Author Share Posted February 3, 2007 Thanks for the reply. <quote>You'll need to check the query to make sure it's pulling the products_weight from the database (I don't think it does on that page)</quote> I think that is the problem, how do i make it do that ? Link to comment Share on other sites More sharing options...
Chris Dunning Posted February 3, 2007 Share Posted February 3, 2007 In product_info.php is a line that looks something like this: select p.products_id, p.products_image, p..... I don't have it in front of me so I'm shooting from the hip here - but find that and add in: p.products_weight, Chris Dunning osCommerce, Contributions Moderator Team Please do not send me PM! I do not read or answer these often. Use the email button instead! I do NOT support contributions other than my own. Emails asking for support on other people's contributions will be ignored. Ask in the forum or contact the contribution author directly. Link to comment Share on other sites More sharing options...
itsgraham Posted February 3, 2007 Author Share Posted February 3, 2007 yes, i had seen that and added it to the list but all i get is the $product_info['products_weight'] showing on the page Link to comment Share on other sites More sharing options...
Chris Dunning Posted February 3, 2007 Share Posted February 3, 2007 Change it to this: <?=$product_info['products_weight']?> Chris Dunning osCommerce, Contributions Moderator Team Please do not send me PM! I do not read or answer these often. Use the email button instead! I do NOT support contributions other than my own. Emails asking for support on other people's contributions will be ignored. Ask in the forum or contact the contribution author directly. Link to comment Share on other sites More sharing options...
itsgraham Posted February 3, 2007 Author Share Posted February 3, 2007 excellent, you are a star Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.