You are here:  » Ring Revenue Phone Number for Specific Merchants and Products

Support Forum



Ring Revenue Phone Number for Specific Merchants and Products

Submitted by lunen on Mon, 2011-06-06 14:48 in

Hi David,

I'm trying out ring revenue, I'm sure you've seen it. Your website visitors call a phone number and if they place an order over the phone or complete a certain action, the affiliate gets the commission.

I'm trying to figure out the best way to display a phone number for a merchant on the merchant page and on the product page. It seems like on the merchant page you can parse the URL for the merchant, I'm not sure how to do this on the product page.

Any suggestions would be great!

Thanks,

Submitted by support on Mon, 2011-06-06 17:02

Hi Lunen,

The best approach I think will be as per custom descriptions, so the first step is to create a new folder on your site called ringrevenue/ containing .html files instructions and the phone number called

Merchant-Name.html

e.g.

ringrevenue/Widget-Co.html

On merchant search result pages the number can be called in by detecting a merchant search. To display the number at the top of search results, in search.php look for the following code around line 304:

  if (isset($searchresults))
  {

...and REPLACE with:

  if (isset($searchresults))
  {
    if ($parts[0]=="merchant")
    {
    $ringrevenueFilename = "ringrevenue/".tapestry_hyphenate($parts[1]).".html";
    if (file_exists($ringrevenuFilename))
    {
      require($ringrevenueFilename);
    }

Similarly, in html/product.php, almost exactly the same code can be used to include the ringrevenue HTML after the description. Look for the following code around line 12:

        <?php if ($mainProduct["description"]): ?>
          <p><?php print $mainProduct["description"]; ?></p>
        <?php endif; ?>

...and REPLACE with:

        <?php if ($mainProduct["description"]): ?>
          <p><?php print $mainProduct["description"]; ?></p>
        <?php endif; ?>
        <?php
          $ringrevenueFilename = "ringrevenue/".tapestry_hyphenate($mainProduct["merchant"]).".html";
          if (file_exists($ringrevenueFilename))
          {
            require($ringrevenueFilename);
          }
        ?>

Hope this helps!

Cheers,
David.
--
PriceTapestry.com