Hello David,
I've noticed that the dots (.) and slashes (/) are missing from the title of all the products. However I do understande that you cannot have extra "."s and "/"s in the URL or else the URL will be different than you wanted it to be. But there could be a way if I could replace every "." with DOT in the URL, but then in the title and comparisons it would replace the DOT with a "." later.
Sorry I couldn't explain this any clearer. Thanks in advance.
Michael
Well... would it be possible to just replace the "."s with a space or something?
A lot of items like:
Samsung Quadband D900 Bluetooth 32MP Video Phone
should display 3.2MP instead of 32MP (that's a big difference).
Thanks for all your help so far.
Michael
Hi Michael,
Yes - you can do that.
In fact, you might want to _try_ letting "."s be permitted, but you should make sure that everything is still working correctly after making the change.
In includes/admin.php, the product name is "normalised" on the following line in the admin__importRecordHandler() function:
$record[$admin_importFeed["field_name"]] = tapestry_normalise($record[$admin_importFeed["field_name"]]);
Now, you can permit the "." character by changing this as follows:
$record[$admin_importFeed["field_name"]] = tapestry_normalise($record[$admin_importFeed["field_name"]],"\.");
The additional parameter to the tapestry_normalise() is a list of characters to allow, but the "\" is just an escape character in this instance. I would certainly not recommend allowing the forward slash as this really will interfere with the URL!
If you find this still causes problems, undo the change above and move the code around slightly in the same function so that the user filters are applied before the standard filters. You will be able to identify these blocks of code as follows:
/* apply standard filters */
...several lines of code here...
/* apply user filters */
...several lines of code here...
/* apply extras */
To make the swap, change the first two blocks around like this:
/* apply user filters */
...several lines of code here...
/* apply standard filters */
...several lines of code here...
/* apply extras */
Having made this change, you can now register a "Search and Replace" filter against the product name, searching for "." and replacing with " " (space).
Hope this helps,
Cheers,
David.
THANKS!
The dots now work after I imported and added:
<?php
$record[$admin_importFeed["field_name"]] = tapestry_normalise($record[$admin_importFeed["field_name"]],"\.");
?>
Thanks again!
Michael
Hi Michael,
I think I understand what you're getting at - perhaps using a placeholder to replace "/"s and "."s. Ultimately, this would be possible, but as the script is geared entirely around using the "normalised" product name it would take a lot of modification to do.
Normalisation is the process of making everything "safe and the same", and is why the script is so easy to work with. If we start trying to allow these types of characters into the product names the complexity increases substantially i'm afraid.
Hope this helps explain the situation...
Cheers,
David.