View Single Post
  #2  
Old 01-27-2016, 05:14 AM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default Re: XCart 5 - Enable/Disable Shipping & Payment Methods Based On Country Selected

Without testing, just taking a glance at the code, it looks like the template is default/en/shipping_list.tpl

In that template I see {foreach:getRates(),rate}

I believe I see this getRates() method defined in XLite\View\ShippingList.php

There may be a more elegant solution, but my starting point would be to attempt to expand the logic of this getRates() method. Right now it is a simple return, we could start modifying it like this (psuedocode warning):

Code:
protected function getRates() { $rates = $this->getModifier()->getRates(); $modified_rates = array(); foreach ($rates as $rate) { if ($rate *meets condition*) { $modified_rates[] = $rate; } } return $modified_rates; }

Again, this is just a quick look, not sure if these files or methods are even related to your task!

-Mike
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote