| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Changing Shipping Module Name Dynamically | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||||
|
|||||||||
Changing Shipping Module Name Dynamically
I have some particular events based on which I am refreshing the shipping module widget. Now I want to change the shipping module name for different cases. That name changing is not just the frontend name change but it should be reflected in other pages aswell. (Checkout Page, Success Page, Admin Page) etc.
Please let me know where I am suppose to do this change. So far I have done the change in the following file: File: \xcart\classes\XLite\Module\Swipezoom\Internationa lShipping\View\ShippingList.php /** * Get rate method name * * @param \XLite\Model\Shipping\Rate $rate Shipping rate * * @return string */ protected function getMethodName(\XLite\Model\Shipping\Rate $rate) { if($rate->getMethod()->getName() == "Swipezoom InternationalShipping" && !empty(\XLite\Core\Session::getInstance()->swipezoomTitle)) return \XLite\Core\Session::getInstance()->swipezoomTitle; else return $rate->getMethod()->getName(); } But this change only reflects on the frontend. I want to use the same shipping name in session everywhere for this particular order.
__________________
Regards, Aneel Sarwar X-Cart version: 5.2.10 Windows: 7 Modules: Free version modules |
|||||||||
#2
|
|||||||||
|
|||||||||
Re: Changing Shipping Module Name Dynamically
I'm not sure if I understand what you are trying to do, but it sounds as a weird hack.
Why don't you add a database record for every shipping method like other shipping modules do? Check the FedEx integration module (the install.yaml file), for example.
__________________
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 |
|||||||||
#3
|
|||||||||
|
|||||||||
Re: Changing Shipping Module Name Dynamically
In backend the shipping module needs to be same, its just that a different shipping module title on the frontend.
__________________
Regards, Aneel Sarwar X-Cart version: 5.2.10 Windows: 7 Modules: Free version modules |
|||||||||
#4
|
|||||||||
|
|||||||||
Re: Changing Shipping Module Name Dynamically
Issue resolved. Just changed the frontend name, kept the backend name same.
__________________
Regards, Aneel Sarwar X-Cart version: 5.2.10 Windows: 7 Modules: Free version modules |
|||||||||
|
|||
X-Cart forums © 2001-2020
|