You are here:  » Feed with silly amount of breaks.


Feed with silly amount of breaks.

Submitted by stevewales20 on Thu, 2013-08-08 17:52 in

Hi David,

I have a feed which display extra data but in order to do so they have it so that they're using a stupid amount of breaks.

<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />S<br /><br />M<br /><br />L<br /><br />XL<br /><br /><br /><br />Bust<br /><br />34&Prime;<br /><br />36&Prime;<br /><br />38&Prime;<br /><br />40&Prime;<br /><br /><br /><br />Waist<br /><br />26&Prime;<br /><br />28&Prime;<br /><br />30&Prime;<br /><br />32&Prime;<br /><br /><br /><br />Low Waist<br /><br />28.5&Prime;<br /><br />30.5&Prime;<br /><br />32.5&Prime;<br /><br />34.5&Prime;<br /><br /><br /><br />Hip<br /><br />36&Prime;<br /><br />38&Prime;<br /><br />40&Prime;<br /><br />42&Prime;<br /><br /><br /><br /><br />

Just wondering if i can use one of the filters you have provided in the past to disregard that information?

Like target

<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />

or something?

Thanks
Steve

Submitted by support on Thu, 2013-08-08 18:26

Hi Steve,

The Strip HTML filter should do the trick - apply to the Description field of the feed in question...

Cheers,
David.
--
PriceTapestry.com

Submitted by stevewales20 on Fri, 2013-08-09 07:42

I was thinking about that, but then i'd like to retain some of the lines breaks for others descriptions, it seems to be only certain products causing the issues.

I have a question about the product mapping. If I apply like the description/categories. Should these be applying to all mapped products? By this i mean, should say the five products which are grouped, have the same category?

The reason i'm asking is, i'm using them in my breadcrumbs, and for some reason certain products are not mapping correctly. The category is not being filled when i have specified it in the mapping stage.

Thanks,
Steve

Submitted by support on Fri, 2013-08-09 08:38

Hi Steve,

You could always just use a Search and Replace filter to remove "" specifically. I would suggest replacing with SPACE, however that will leave you with long strings of supurflous spaces in your HTML stream which whilst it will look fine isn't really a great idea; so then you could add the following new filter "Clean Spaces" and apply that _after_ the Search and Replace to remove all strings of 2 or more spaces:

  /*************************************************/
  /* Clean Spaces */
  /*************************************************/
  $filter_names["cleanSpaces"] = "Clean Spaces";
  function filter_cleanSpacesConfigure($filter_data)
  {
    print "<p>There are no additional configuration parameters for this filter.</p>";
  }
  function filter_cleanSpacesValidate($filter_data)
  {
  }
  function filter_cleanSpacesExec($filter_data,$text)
  {
    return preg_replace('/[ ]{2,}/',' ',$text);
  }

Regarding product mapping, I just checked the last includes/admin.php that I forwarded to you and I recall positioning the override logic prior to the Category / Product Mapping code since you make use of the values (I think) in Category Mapping, so perhaps that code needs to be moved to go in between Product and Category mapping - I'll make that change for you and forward the follow up by email for you...

Cheers,
David.
--
PriceTapestry.com