Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

File Loaction Rate Topic   - - - - -

 
  • cseamiya
  • Advanced Member
  • Trial users
  • Join Date: 09-May 17
  • 64 posts

Posted 11 May 2017 - 10:03 AM #1

how to find app/controllers/frontend/checkout.php file in cs cart



 
  • Hungryweb
  • Senior Member
  • Authorized Reseller
  • Join Date: 10-Feb 12
  • 1249 posts

Posted 11 May 2017 - 10:25 AM #2

design/themes/[THEME_NAME]/templates/views/[CONTROLLER]/[MODE].tpl

for you will depend on mode

design/themes/[THEME_NAME]/templates/views/checkout/[MODE].tpl

mode is the right side of 

.

for ex:

...index.php?dispatch=checkout.cart

controller = checkout

mode = cart

 

 

I hope that helps,

 

---

Valentin
part of hungryweb.net



 
  • cseamiya
  • Advanced Member
  • Trial users
  • Join Date: 09-May 17
  • 64 posts

Posted 11 May 2017 - 10:51 AM #3

2. Add the following code:
 
        if ($action == 'buy_now') {
            fn_redirect('checkout.cart');
        }
 
just before the following line:
 
if (md5(serialize($cart['products'])) != $previous_state && empty($cart['skip_notification'])) {
 
in the app/controllers/frontend/checkout.php file (line 65 approximately).
 
 
i want to add this line on that php  file 


 
  • Hungryweb
  • Senior Member
  • Authorized Reseller
  • Join Date: 10-Feb 12
  • 1249 posts

Posted 11 May 2017 - 01:39 PM #4

Now I get the question :D

 

From the CS-Cart backend you are not able to access the php files, you will need to use ftp or cpanel



 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11338 posts

Posted 11 May 2017 - 08:45 PM #5

Would strongly suggest you use a local (eg. my_changes) checkout.pre.php controller to check for your "buy_now" mode and do the redirection so that your change will survive an upgrade.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.