You are here:  » new window for jump.php, three lines for featured products & merchant name to display on merchants page

Active Forum Topics


new window for jump.php, three lines for featured products & merchant name to display on merchants page

Submitted by sydney880 on Mon, 2014-07-07 13:43 in

Hi,

I hope you can please help with these three issues:

1. I have already modified the jump.php page to open in a new window/tab as per a previous forum discussion. The problem is that if a user clicks on another link then the new page will open in the same new window as the previous one. Is it possible so that if a user clicks on "Visit Store" for multiple products that they each will open in a new tab?

2. The featured products on the homepage do not display nicely as the title for each product has different lengths. For example some titles take up 1 line, some 2 lines & some 3 lines. Is it possible to make the title 3 lines for all products regardless so that the products all match up in their format? So if the title was only 1 line, it would just have 2 blank lines. For example see the problem here: {link saved}

3. I am adding merchant logos for the merchants, but for some merchants it may be difficult for users to recognise the merchant from their logo. Is it possible to have the merchant name also display below each merchant logo?

Thanks

Submitted by support on Mon, 2014-07-07 15:51

Hi Sydney,

Re 1;

What you'd need to do is make sure that each link created has a different target window name. There's a couple of different modifications described to do this, where you would have added:

  target='_BLANK'

If it's in PHP mode (e.g. the modification was made in includes/tapestry.php then REPLACE the above with:

  target='".uniqid()."'

Or if it's in HTML as a modification in html/prices.php, then REPLACE with:

  target='<?php print uniqid(); ?>'

Re 2;

This is a slightly tricky one. Some users crop the title used in Featured Products display to say, the first 30 characters, which you can do using the internal "tidy" tapestry_substr() function that breaks on the first SPACE after the specified length. If you'd like to try this method, look for where the title is displayed by this code within line 15 of html/featured.php:

  <?php print $product["name"]; ?>

...and REPLACE with:

  <?php print tapestry_substr($product["name"],30); ?>

An alternative would be to make the pt_fp_name a block display style with a fixed height. To try this version, add the following to your html/default.css:

  .pt_fp_name {
    display: block;
    height: 80px;
  }

Re 3;

Sure, in html/prices.php look for the following section beginning at line 48:

  <td class='pt_pr_mlogo'><a href='<?php print tapestry_buyURL($product); ?>'><img alt='<?php print htmlspecialchars($product["merchant"],ENT_QUOTES,$config_charset); ?> <?php print translate("Logo"); ?>' src='<?php print $config_baseHREF."logos/".str_replace(" ","%20",$product["merchant"]); ?>' /></a></td>

...and REPLACE with:

  <td class='pt_pr_mlogo'><a href='<?php print tapestry_buyURL($product); ?>'><img alt='<?php print htmlspecialchars($product["merchant"],ENT_QUOTES,$config_charset); ?> <?php print translate("Logo"); ?>' src='<?php print $config_baseHREF."logos/".str_replace(" ","%20",$product["merchant"]); ?>' /></a>
<br />
<span class='pt_pr_mtext'><a href='<?php print tapestry_buyURL($product); ?>'><?php print $product["merchant"]; ?></a></span>
</td>

Hope this helps!

Cheers,
David.
--
PriceTapestry.com

Submitted by sydney880 on Sat, 2014-07-19 12:20

Hi David,

Thanks for your reply.

1. In includes/tapestry.php I changed the line so it was like below, but when clicking on links, they opened in the same new tab as other links that I had clicked. (BTW I also tried changing with the same format as you mentioned, but it seems this was a code error):
return $retval."' target='.uniqid().";

2. The block display works well thanks.

3. The code you gave displays the merchant name under the logo on the product pages. How can I also display the merchant names under the merchant logos on the "browse by merchant" page?

Thanks a lot.

Submitted by support on Sun, 2014-07-20 09:29

Hi Sydney,

Re: 2;
I can see the code error there, please use:

 return $retval."' target='".uniqid();

Re 3;
To do this, edit your html/atoz.php and look for where the logo is displayed (if $item["logo"] is set) at line 30:

  <img alt='<?php print htmlspecialchars($atoz_item["name"],ENT_QUOTES,$config_charset); ?>' src='<?php print $atoz_item["logo"]; ?>' />

...and REPLACE with:

  <img alt='<?php print htmlspecialchars($atoz_item["name"],ENT_QUOTES,$config_charset); ?>' src='<?php print $atoz_item["logo"]; ?>' />
  <br />
  <?php print $atoz_item["name"]; ?>

Cheers,
David.
--
PriceTapestry.com