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

shipping markup

 
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)
 
Thread Tools Search this Thread
  #1  
Old 10-15-2014, 09:54 AM
 
Phil Richman Phil Richman is offline
 

Advanced Member
  
Join Date: May 2012
Posts: 94
 

Default shipping markup

I want to add a 10% markup to all shipping rates. I've been trying to find the array that contains the complete list of available shipping options so I can do a foreach and add 10% to each element value returned before it is displayed to the customer. Does anyone know what array and in what file this is located? I'm having a hard time finding this.
__________________
Ver 5.2.6
Reply With Quote
  #2  
Old 10-15-2014, 11:50 PM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default Re: shipping markup

\XLite\Logic\Order\Modifier\Shipping - this is the class that adds the shipping cost to the order total. I guess you should look into decorating it so that it will add the 10% markup.
__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions
Reply With Quote
  #3  
Old 10-16-2014, 05:32 AM
 
Phil Richman Phil Richman is offline
 

Advanced Member
  
Join Date: May 2012
Posts: 94
 

Default Re: shipping markup

Quote:
Originally Posted by qualiteam
\XLite\Logic\Order\Modifier\Shipping - this is the class that adds the shipping cost to the order total. I guess you should look into decorating it so that it will add the 10% markup.
I'm not having much luck with this. Can you give me a little further detail.
__________________
Ver 5.2.6
Reply With Quote
  #4  
Old 10-17-2014, 06:06 AM
  tony_sologubov's Avatar 
tony_sologubov tony_sologubov is offline
 

X-Cart team
  
Join Date: Jan 2009
Posts: 2,431
 

Default Re: shipping markup

Hi Phil!

You may want to decorate the getRates() method of the XLite\Model\Shipping class. As you can see, it gathers shipping rates from processors (User-defined, USPS, UPS, etc) and then process it.

Depending on your may want to decorate applyMarkups() method of the same class.

Please, let me know if it all makes sense to you.

Tony.
__________________
Found a bug in X-Cart? Post it to our bug tracker!
Know how to make X-Cart better? Suggest an idea!
Reply With Quote

The following user thanks tony_sologubov for this useful post:
qualiteam (10-17-2014)
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 01:34 AM.

   

 
X-Cart forums © 2001-2020