Hey Gang, first all I would like to say what an awesome contribution this is!! excellent effort and works flawlessly on the site.
Secondly I've been beating my head against a wall for a couple of hours now trying to add a custom button that will pass information off to another contribution so that it sends information to calling page. To be specific I want to add a custom button that you can add a the pricematch contribution to a product description on only certain products. I can display the text just fine but the information needed for the pricematch ( model #, Price, and product name) doesn't pass through to the price match contribution. The code looks like this
editor_basic.js
// Custom3
else if (cmdID == 'custom3') { // insert some text
editor_insertHTML(objname, "<a href=java script:popupPricematch(\\\'' . tep_href_link(FILENAME_PRICEMATCH, 'code1=' . $this_Code . &product1= . $this_Product . &price1= . $this_Price) . '\\\')><?php tep_image_button('button_price_match.gif'); ?></a>");
}
This is the script in it's working form if placed in product_info.php:
<? require(DIR_WS_LANGUAGES . $language . '/pricematch.php'); ?>
<?php
$this_Code = $product_info['products_model'];
$this_Product = $product_info['products_name'];
$this_Price = $product_info['products_price'];
?>
<script language="javascript"><!--
document.write('<?php echo '<a href="java script:popupPricematch(\\\'' . tep_href_link(FILENAME_PRICEMATCH, 'code1=' . $this_Code . "&product1=" . $this_Product . "&price1=" . $this_Price) . '\\\')">' . tep_image_button('button_price_match.gif') . '</a>'; ?>');
//--></script>
But I only want to call it using a custom button in the product editor when it's necessary PLEASE HELP