Documentation You are here: start » v » 2.0 » shipping » custom_code » trexity

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
v:2.0:shipping:custom_code:trexity [2024/03/26 12:17] – [Steps] adamv:2.0:shipping:custom_code:trexity [2024/03/27 08:43] (current) – [Steps] adam
Line 84: Line 84:
  
 ==== Steps ==== ==== Steps ====
 +
 +<WRAP center round info 90%>
 +Note, as Trexity requires the full address for getting rates, including the address line 1, it's not possible to get shipping rates from the cart. The steps below includes code to hide the address entry on the cart, and makes it so the checkout doesn't try to fetch shipping if the address line 1 is still empty.
 +</WRAP>
 +
  
   - Log in to your store's Foxy administration   - Log in to your store's Foxy administration
   - Head to the "Configuration" page   - Head to the "Configuration" page
-  - Enable the "Add custom header and footer code to your templates" option, and paste the following code into the "custom footer" textarea (Trexity requires addresses include the address line 1, so this hides the address entry on the cart and only gets rates if the address line 1 is entered on the checkout too):\\<code html>{% if context == "cart" %}+  - Enable the "Add custom header and footer code to your templates" option, and paste the following code into the "custom footer" textarea:\\ <code javascript>{% if context == "cart" %}
 <script> <script>
     // We can't get the full address from the cart, so let's just skip it here     // We can't get the full address from the cart, so let's just skip it here
Line 110: Line 115:
 } }
 </script> </script>
-{% endif %}{ # if context == "context" #}</code>+{% endif %}{# if context == "checkout" #}</code>
   - Save the configuration section   - Save the configuration section
   - Head to the "Shipping" page   - Head to the "Shipping" page

Site Tools