Guest Posted June 4, 2008 Share Posted June 4, 2008 I have removed the Buy Now button from a store and instead I'm using a Quote button to take the customer to a Contact Us form that automatically inputs the following product details:- #################################### Price Inquiry Product Id: Product Url: Price From: Product Name: #################################### In product_listing.php I have changed the case 'PRODUCT_LIST_BUY_NOW' to the following case 'PRODUCT_LIST_BUY_NOW': $lc_align = 'center'; $lc_text ='<a href="' . tep_href_link(FILENAME_CONTACT_US, 'enquiry=Price Inquiry%0D%0A%0D%0AProduct Id: ' . $HTTP_GET_VARS['products_id'] . '%0D%0AProduct Url: ' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['products_id'] . '%0D%0AProduct Name: ' . $product_info['products_name'] .'%0D%0A%0D%0A') . '') . '" class="pricing"><img src="includes/languages/english/images/buttons/button_in_cart.gif" border="0"></a>'; break; ************************************** In product_info.php I've added the following where the old button_in_cart code was:- <tr><td colspan=2 align=right> <?php echo '<a href="' . tep_href_link(FILENAME_CONTACT_US, 'enquiry=Price Inquiry%0D%0A%0D%0AProduct Id: ' . $HTTP_GET_VARS['products_id'] . '%0D%0AProduct Url: ' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['products_id'] . '%0D%0AProduct Name: ' . $product_info['products_name'] .'%0D%0A%0D%0A') . '') . '" class="pricing"><img src="includes/languages/english/images/buttons/button_in_cart.gif" border="0"></a>';?> </td> </tr> *************************************** The problem Im having is when I try and add the code to new_products.php Ive added the following to replace the info and buy now buttons:- <td colspan=2 align=right><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . tep_image_button('small_view.gif') . '</a><a href="' . tep_href_link(FILENAME_CONTACT_US, 'enquiry=Price Inquiry%0D%0A%0D%0AProduct Id: ' . $listing['products_id'] . '%0D%0AProduct Url: ' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $listing['products_id'] . '%0D%0APrice From: ' . $listing['products_price'] . '%0D%0AProduct Name: ' . $listing['products_name'] .'%0D%0A%0D%0A') . '') . '" class="pricing"><img src="includes/languages/english/images/buttons/button_in_cart.gif" border="0"></a> </td></tr> but for some reason the fields that it enters into the contact form are not populated with the products details.. Can anyone spot where I have gone wrong with the code for new_products???? Any help would be much appreciated.. Cheers Link to comment Share on other sites More sharing options...
Jack_mcs Posted June 4, 2008 Share Posted June 4, 2008 See the Request Product Info contribution in my contributions to find out how to do that. Jack Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Guest Posted June 4, 2008 Share Posted June 4, 2008 Thanks for the quick reply. That contribution dosnt tell me how to do what I want, it only gives me a completely different way of doing the whole thing. As Ive already applied my code changes to my store, the quickest way is to just continue down the path Ive set. So I just need to tweek that last bit of code to allow it to work.. Only thing is, what do I tweek on it, as I cant figure out why its not populating the fields.. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.