Jump to content

Remove the "Paypal Checkout" from the product.tpl ?


Recommended Posts

Hi,

 

On the mobile theme, does anybody know where the code is for displaying the "Paypal Checkout", which is just above the "Add to Cart" on the product pages ?

 

I would like this removing, because if someone presses this, then they get that item without paying any shipping costs, even though I have shipping set up and working.

 

I have disabled the 3 click checkout in the module, but the button stays put :(

 

Ray

Link to comment
Share on other sites

I just checked this in my 1.5.4.1 test site and you are correct the paypal checkout remains even with NO selected for 3 click.

 

Here is the solution, edit ..modules/paypal/css/paypal.css and add display:none at line 46.

 

#payment_paypal_express_checkout{cursor:pointer;display:none}

Edited by tdr170 (see edit history)
Link to comment
Share on other sites

  • 2 weeks later...

I have tested this and it does work, you more then likely need to turn on force compile and turn off cache.

If that still does not do the trick using your FTP go to the files then cache/smarty/ and delete all files and folders within the cache and compile folders, do not delete the index.php in the root of these folders if present.

  • Like 1
Link to comment
Share on other sites

Check your code you do not have display spelled correctly:

 

here is your code:

#payment_paypal_express_checkout{cursor:pointer;dispay:none}

 

it should be:

#payment_paypal_express_checkout{cursor:pointer;display:none}

 

:blush:

 

fixed, thanks a lot for your input, now i only need to find a way to import the products and customers and we are ready to run

 

gr Remco

Edited by dutchhelipilot (see edit history)
Link to comment
Share on other sites

Thanks Vekia, that has done the trick.

But I have started work on our mobile site by using css media queries, it seems to be going good so far.

What you may be able to help me with is a simple line of code.

 

I want something like...

 

{if} mobiledetect=true (do this) {else} (do this instead){/if}

 

Im not too familiar with smarty but starting to get the hang of it.

 

Is there a variable already available to detect mobile users ?

 

It is so that I can disable certain modules when browsing via a mobile device.

 

Thanks

 

Ray

Link to comment
Share on other sites

Ahh, I think I just found my solution lol...

 

Is this the correct way to go around displaying different content depending on mobile/desktop use ?

 

{if $PS_ALLOW_MOBILE_DEVICE}You are using a desktop{else}<p>You are using a mobile</p>{/if}

 

And if I placed a whole module in here, would that break things or would it just disabled the module it completely.

 

Ray

Link to comment
Share on other sites

Hi Vekia,

 

No I don't want to check if the mobile template is available. ( So I think my suggestion above is wrong )

Im currently adapting the default template using css media queries.

 

I want to check (probably using smarty) "if using a mobile device" then don't process this module/hook, else display it

 

Thanks

 

Ray

Link to comment
Share on other sites

Yes I am adapting the website to be responsive.

 

I don't want to have to turn on the built in mobile theme.

 

Can I not initiate that mobile detection code somewhere else, so I don't need to turn on the built in mobile theme ?

 

This php code works for basic php sites, but I need a smart version.

 

<!-- Detect Browser -->
<?php
 $browser = strpos($_SERVER['HTTP_USER_AGENT'],"iPhone");
   if ($browser == true){
   $browser = 'iphone';
 }
?>
<?php if($browser == 'iphone'){ ?>
 THIS IS AN IPHONE BROWSER
<?php }else{ ?>
THIS IS NOT AN IPHONE<?php } ?>

 

Thanks

 

Ray

Link to comment
Share on other sites

i think that you can do a simple workaround.

 

classes/controllers/frontcontroller.php file

 

create there function like this:

 

public static function ismobile(){
$browser = strpos($_SERVER['HTTP_USER_AGENT'],"iPhone");
if ($browser == true){
return true;
}
}

 

 

then in smarty template files (anywhere you want) you will be able to use this code:

 

{if FrontController::ismobile()==true}
THIS IS MOBILE
{/if}

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...