Ray UK Posted August 10, 2013 Share Posted August 10, 2013 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 More sharing options...
tdr170 Posted August 10, 2013 Share Posted August 10, 2013 (edited) 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 August 10, 2013 by tdr170 (see edit history) Link to comment Share on other sites More sharing options...
dutchhelipilot Posted August 22, 2013 Share Posted August 22, 2013 Tried this solution but the button stays in the mobile site gr Remco Link to comment Share on other sites More sharing options...
tdr170 Posted August 22, 2013 Share Posted August 22, 2013 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. 1 Link to comment Share on other sites More sharing options...
dutchhelipilot Posted August 23, 2013 Share Posted August 23, 2013 tried al the combos cache on and of removing cache dirs but the bottom stays? see 4rc.nl/winkel for our test site Link to comment Share on other sites More sharing options...
tdr170 Posted August 23, 2013 Share Posted August 23, 2013 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} Link to comment Share on other sites More sharing options...
vekia Posted August 23, 2013 Share Posted August 23, 2013 you can always remove the module from displayProductFooter section under the modules > positions tab in your back office 1 Link to comment Share on other sites More sharing options...
dutchhelipilot Posted August 23, 2013 Share Posted August 23, 2013 (edited) 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} 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 August 23, 2013 by dutchhelipilot (see edit history) Link to comment Share on other sites More sharing options...
tdr170 Posted August 23, 2013 Share Posted August 23, 2013 (edited) I see you have a RC Hobby Shop, Here is my site: http://team-shepherdusa.com/shop Do you have an existing online shop and what is the cart program you used for it. vekia: thanks for the input I was unaware of your solution I will give that a look for future reference. Edited August 23, 2013 by tdr170 (see edit history) Link to comment Share on other sites More sharing options...
dutchhelipilot Posted August 23, 2013 Share Posted August 23, 2013 we run oscommerce but it has so many mods that installing a new payment module costed us more than 20 hours. Prestashop works way easier changing parts of it. gr Remco Link to comment Share on other sites More sharing options...
Ray UK Posted August 23, 2013 Author Share Posted August 23, 2013 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 More sharing options...
Ray UK Posted August 23, 2013 Author Share Posted August 23, 2013 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 More sharing options...
vekia Posted August 23, 2013 Share Posted August 23, 2013 the question is: you want to check "if mobile version is availabe" (setting in prestashop configuration) or something like "what version of website is browsed" ? Link to comment Share on other sites More sharing options...
Ray UK Posted August 23, 2013 Author Share Posted August 23, 2013 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 More sharing options...
vekia Posted August 24, 2013 Share Posted August 24, 2013 hello in this case you have to use this condition: {if $mobile_device == true} MOBILE WEBSITE {else} NORMAL WEBSITE {/if} Link to comment Share on other sites More sharing options...
Ray UK Posted August 24, 2013 Author Share Posted August 24, 2013 Hi, thanks for your suggestion. Does this code only work if I have checked "Use mobile site" in the Back office ? I have placed this code in my footer, and I only get the "NORMAL" showing on both my laptop, and my mobile. The code is on this page http://www.electroniccigarettee-liquid.co.uk/ Thanks Ray Link to comment Share on other sites More sharing options...
vekia Posted August 24, 2013 Share Posted August 24, 2013 your website has got responsive theme, so method above will not work. it's because you have to turn on normal "mobile" theme in the preferences > themes. Link to comment Share on other sites More sharing options...
Ray UK Posted August 24, 2013 Author Share Posted August 24, 2013 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 More sharing options...
vekia Posted August 24, 2013 Share Posted August 24, 2013 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now