Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Request Quotation


Guest

Recommended Posts

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

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

Archived

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

×
×
  • Create New...