You are here:  » Is this possible


Is this possible

Submitted by mally on Mon, 2008-05-12 18:49 in

Hello David

I'm looking to add a feed which I will create myself.

These will be direct offers, so there will be no need for a price comparison table as I will just list the price and the goto button.

Could you give me adivce on how to achieve this?

for example if I called the merchant "direct" and if the product looked at was one from the "direct" feed the normal prices table would be ignored and another version show with just the Direct price and link.

I've checked and the prices.php is currently not used and instead the code is inserted directly into html/product.php

is there a way of adding an if command?

Cheers

Mally

Submitted by support on Mon, 2008-05-12 18:57

Hi Mally,

The basic IF structure you want is:

<?php if ($product["merchant"]=="Direct"): ?>
...Direct merchant code here...
<?php else: ?>
...Original code here...
<?php endif; ?>

I'm guessing that for the direct merchant code, you only want to display the Buy Now link as shown in this thread, in which case just cut the following section out from that mod:

</span>
<span class='nobr'><a href='<?php print tapestry_buyURL($product); ?>'>Visit Store</a></span>

...and use this where it says ...Direct merchant code here... above; with the original code in the
...Original code here... section...

If you're not sure how to structure it post the section you want to modify and I'll show you where to add the IF's etc...

Cheers,
David.