Forum

Get Shop eMail address

I know this is possibly a simple question, and the answer is in the documentation but I can not seem to find it.

From the main index.php page, How do I get the Shop email address from the settings? I need this to show the basket.

Many Thanks

Dennis Pickworth

Dennis Pickworth 0 points

  • 6 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

In a template you can use

<perch:setting id="perch_shop_paypal_email" />

I am not using a template. This is only so i can pull up the basket to show the user. Do I need to use a template?

Cheers

Drew McLellan

Drew McLellan 2638 points
Perch Support

How are you displaying the basket without a template?

We had the same issue. We have a basket link in the navigation on all pages. The navigation code (and some of the pages in the site) is not actually in Perch control. In the end we opted to hard code the PayPal email address into the required FORM code in the PHP-included <nav> code. Its unlikely the PayPal email address is going to change much so its no problem to change it in 2 places if that happens ...

<form target="paypalx" class="viewbasketx" action="https://www.paypal.com/cgi-bin/webscr" method="post">
    <input type="hidden" name="cmd" value="_cart">
    <input type="hidden" name="business" value="paypal@domain.com">
    <input type="hidden" name="display" value="1">
    <input type="submit" class="basket" value="Basket">
</form>

Drew,

I am displaying the Basket the same way as Graham. This is in the main page.

I will hard code the email address.

Cheers