For shipping to US from Canada, the shopping cart shows several shipping options that is quite confusing. Is there a way to narrow it down to 1-2 options that I prefer to use with CP?
You'd have to customize the Canada Post plugin, or Shipping Director can do it. See this blog example.
The Name Expression uses the ternary if-then-else operator " ? : " ). When an external shipping plugin (e.g. “Shipping.CanadaPost”) is in the Rate Expression field, the Name Expression checks each method from the carrier, and if the expression evaluates to blank ("") the method is suppressed.
Your config would just be a one-liner:
10 Option Shipping true Shipping.CanadaPost Country = "US" and [$Name].Contains("XYZ") ? "" : [$Name]
Or if you have many method names to suppress, use OR between each, but be sure to enclose in parenthesis:
Country = "US" and ( [$Name].Contains("XYZ") OR [$Name].Contains("ABC") ) ? "" : [$Name]
Thank you. So, I am going to try and configure without the Shipping Director plug-in. I've never done this type of configuration before. Can you please provide a link or take me exactly through the steps? Not even sure which file to add this code to. Thanks so much in advance!
I also am having the same problem. Where exactly would those configurations need to be placed? I'm not noticing any files that would allow to be modified in such a way...