Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Remove Payment Total From Button?

 
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)
 
Thread Tools Search this Thread
  #1  
Old 11-18-2015, 10:08 AM
 
cleverwise cleverwise is offline
 

Advanced Member
  
Join Date: Jun 2014
Posts: 74
 

Default [Resolved] Remove Payment Total From Button?

Hi community,

I was wondering if anyone knows a way to turn off the payment amount in the order button.

I have noticed when visiting the checkout page the order total is given above the pay this button plus added to the pay button.

The issue is the total isn't updated in the payment button when a shipping change is made, thus it is confusing to the customer. I would also just prefer not to have this total in the button anyway.

This behavior is happening on multiple computers with different browsers (IE, Chrome, Opera, etc).

Thanks!
__________________
Respectfully,

Jeremy

X-Cart 5.3 running on:
* Web server: Nginx with PHP-FPM via FastCGI (Opcache enabled)
* Database: Percona Server
* OS: CentOS
Reply With Quote
  #2  
Old 11-18-2015, 10:35 AM
 
cleverwise cleverwise is offline
 

Advanced Member
  
Join Date: Jun 2014
Posts: 74
 

Default Re: Remove Payment Total From Button?

I should add the total isn't updating if Amazon Payments is used. If using standard credit card it does but again doesn't with Amazon Payments. I am guessing there is something in that code that is preventing the screen from updating correctly.

Anyway I still would rather get rid of the total on the button.
__________________
Respectfully,

Jeremy

X-Cart 5.3 running on:
* Web server: Nginx with PHP-FPM via FastCGI (Opcache enabled)
* Database: Percona Server
* OS: CentOS
Reply With Quote
  #3  
Old 11-19-2015, 07:10 AM
 
xgarb xgarb is online now
 

eXpert
  
Join Date: Jul 2004
Location: UK
Posts: 263
 

Default Re: Remove Payment Total From Button?

I did this...

Add a new file to your theme view classes

RemoveTotalFromPlaceOrderButton.php


Code:
<?php namespace XLite\Module\Customer\CustomerTheme\View; class RemoveTotalFromPlaceOrderButton extends \XLite\View\Button\PlaceOrder implements \XLite\Base\IDecorator { /** * Get default label * * @return string */ protected function getDefaultLabel() { return static::t('Place order'); } }

This should replace the figures with simple 'Place Order' text.
__________________
Core version: 5.5.xx
Reply With Quote

The following user thanks xgarb for this useful post:
cleverwise (11-19-2015)
  #4  
Old 11-19-2015, 12:56 PM
 
cleverwise cleverwise is offline
 

Advanced Member
  
Join Date: Jun 2014
Posts: 74
 

Default Re: Remove Payment Total From Button?

Thank you for the code!

I made a standard deployable module for 5.x that can be uploaded and installed like any other module. I did change the text to "Place My Order".

I hope this helps someone else out. You can edit the text if you want but the code is ready to go and was installed into the production copy after my development.

1) Download the attached file and unzip

2) Then in XCart admin go to Modules and upload it to install. Once enabled the magic should happen.
Attached Files
File Type: zip Cleverwise-PlaceOrderTextOnly-v5_2_0.zip (1.5 KB, 92 views)
__________________
Respectfully,

Jeremy

X-Cart 5.3 running on:
* Web server: Nginx with PHP-FPM via FastCGI (Opcache enabled)
* Database: Percona Server
* OS: CentOS
Reply With Quote

The following user thanks cleverwise for this useful post:
razortw (11-20-2015)
  #5  
Old 11-19-2015, 02:33 PM
 
cleverwise cleverwise is offline
 

Advanced Member
  
Join Date: Jun 2014
Posts: 74
 

Default Re: Remove Payment Total From Button?

Sorry I included some code from a custom plugin that isn't necessary. So I reuploaded the reduced file. The code won't hurt anything but it isn't necessary.
__________________
Respectfully,

Jeremy

X-Cart 5.3 running on:
* Web server: Nginx with PHP-FPM via FastCGI (Opcache enabled)
* Database: Percona Server
* OS: CentOS
Reply With Quote

The following user thanks cleverwise for this useful post:
razortw (11-20-2015)
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 08:43 AM.

   

 
X-Cart forums © 2001-2020