Good Morning Team,
I created a file called /html/user_header_after.php add if I put data in that file it shows up on every page.
Is there a way to make it only show up on the index page please...
All the best from Alan
Hi David,
Some sneaky bit of code, I will make good use of that thank you.
One last point and I dont know if it is possible
I have noticed some products have pictures missing.
is there any way to remove the product from the feed, or at best put a dummy picture in...
Thanks in advance
All the best from Alan
Hello Alan,
You could make the Image URL a required field during import. This would have the effect of removing any products that do not have an image (if this is really what you want to do). To make that change, in includes/admin.php look for the following code around line 155:
/* check product record for minimum required fields */
if (!$record[$admin_importFeed["field_name"]] || !$record[$admin_importFeed["field_buy_url"]] || !$record[$admin_importFeed["field_price"]]) return;
...and change this to:
/* check product record for minimum required fields */
if (!$record[$admin_importFeed["field_name"]] || !$record[$admin_importFeed["field_buy_url"]] || !$record[$admin_importFeed["field_price"]] || !$record[$admin_importFeed["field_image_url"]] ) return;
Alternatively, yes you can make it use a default image if there is no image for a particular product. The changes for both the main product page and search results are in this thread:
http://www.pricetapestry.com/node/472
Hope this helps!
Cheers,
David.
Hello Alan,
There are 2 things you can do.
One is to just edit index.php and insert your content in there. For plain HTML, you will have to come out of PHP mode, and then return to PHP mode afterwards, for example:
?>
... YOUR HTML HERE ...
<?php
Alternatively, to keep the Price Tapestry files unchanged, and just edit html/user_header_after.php, you can do it like this:
<?php
switch($_SERVER["PHP_SELF"])
{
case "/index.php":
?>
... YOUR INDEX PAGE HTML HERE ...
<?php
}
?>
Hope this helps!
Cheers,
David.