Hi there,
I have tried to use the 'Name Case' filter against the brand names field but for some reason the filter is not producing desired effects. The brand names are still printing capital letters after the first letter. Any ideas what's causing this situation?
Many Thanks.
Bob
Hello David
Is there a way I can make this happen as soon as the feed is installed, before product mapping and any filters are applied?
Thanks
Mally
Hi Mally,
If you make it the first filter then it should be applied before anything else... All filters are applied before product mapping by default...
Cheers,
David.
Hi David
Was wondering about "Name Case", anytime i try to apply this filter i get this error
Warning: Invalid argument supplied for foreach() in /home/buy247/public_html/admin/feeds_filters.php on line 136
was wondering if you had any remedies for this?
thanks
phil
Hi Phil,
Is it just Name Case that causes this?
Could you email me your admin/feeds_filters.php and i'll take a look for you....
Cheers,
David.
Hello Bob,
The Name Case filter uses PHP's ucwords() function which although capitalises the first letter of each word leaves all other letters unchanged.
If you want to change the behavior of the Name Case filter on your Price Tapestry installation, all you need to do is insert a strtolower() function inline with ucwords(). In includes/filter.php look for the following function (starting at line 124):
function filter_nameCaseExec($filter_data,$text)
{
return ucwords($text);
}
Change this as follows:
function filter_nameCaseExec($filter_data,$text)
{
return ucwords(strtolower($text));
}
That should do the trick!
Cheers,
David.