rgallego85 Posted February 16, 2009 Posted February 16, 2009 Hi guys, I've seen a lot of great stuff here, and I've been reading and learning a lot, but I've been trying to search the forums for a fix to my web page and haven't really found a solution yet. I'm trying to remove the product_info page. What I want is the item description, tell a friend box and date added text to appear on the products_listing page or new_products page (like on the main page) allowing the customer to see everything about the item without clicking to a new page. Basically I just want the main items in the product_info page to show up on the front page or products_listing page. I'm not very good with php code at all, so I've just been trying to copy/paste code around and I've had zero success. Any help you guys can provide would be greatly appreciated, because this one issue is stopping my whole progress with my site.
♥geoffreywalton Posted February 16, 2009 Posted February 16, 2009 There are links all over the place that go to product info so would recommend not trying to remove that screen. You will needs to amend the sql so it retrieves the info you want to display and then add the code to display it on the screen. Suspect you were doing the latter but not the former. Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile Virus Threat Scanner My Contributions Basic install answers. Click here for Contributions / Add Ons. UK your site. Site Move. Basic design info. For links mentioned in old answers that are no longer here follow this link Useful Threads. If this post was useful, click the Like This button over there ======>>>>>.
rgallego85 Posted February 17, 2009 Author Posted February 17, 2009 Okay, I guess my problem is that I don't know which parts of the codes on the product_info page I need so that the same information appears on the product_listing and new_products page. I'm very new to php and sql so I'm kinda moving along through trial and error. For example I found this line in product_info.php: <p><?php echo stripslashes($product_info['products_description']); ?></p> I found that this line shows the product's image and description (I found this out just by deleting and seeing what happens to the page). I also found the variable declaration $product_info and $product_check: $product_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); $product_check = tep_db_fetch_array($product_check_query); and then this one: $product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); $product_info = tep_db_fetch_array($product_info_query); I then try to paste all of these codes into new_products.php and I get a parsing error, so I'm not sure what I'm doing wrong. Is this all that I need or am I missing all sorts of stuff?
Bamben Posted March 25, 2009 Posted March 25, 2009 Dude I just read your post and I think that you are trying to do exactly what I am doing only going about it a different way lol. Ps: sorry I cant spell! listen, I wanted to keep the product info page for each item but never let any one go there by making a different page which is my catalog( holding all pics and descriptions right in your face so that you dont have to do a pointless jump into the product info page) having product descriptions on after another. now this is the important part!!! next to each product description I wanted each one to have its own 'add to cart' button but so far I have been unsucessfull in COPYING it from the product descriptions page! this will also be your problem. I believe it is because each product has its own id and the id is also in the page address on the product info page. when you click the add to cart button it adds the item based appon the id shown in the page address. its not a normal html button that goes to a link its a button that acts appon a command and each product the id is different so I dont know what to say. you are gonna need to move this too so I just thought id tell you what problems i am having from the other side. Ben.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.