X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Free Shipping if over $X, not with a coupon (https://forum.x-cart.com/showthread.php?t=1621)

hhiker 11-29-2007 09:22 AM

Re: Free Shipping if over $X, not with a coupon
 
Ok, after restoring the other files that I had modified to get all carriers to show up with radial buttons w/o that darn dropdown box, I still have the same problem.

It is calculating shipping but the only option it will allow is UPS Ground. Do note, I removed the other options you had in there because I only wanted UPS Ground to show as free over $100. All other options need to show & calculate for orders over $100.

Thinking, thinking, thinking. Logic system is not working today.:(

hhiker 11-29-2007 10:43 AM

Re: Free Shipping if over $X, not with a coupon
 
Ok, we determined that we are buying a mod and not going with this thread. Sorry!!!

zenkisser 12-10-2007 05:27 PM

Re: Free Shipping if over $X, not with a coupon
 
Hi-

Is there a Glitch with this mod, discounts and State Tax?

I have been using this hack for a long time and have never has a issue. Today I set up my first discount in admin. If a sale is over $10.00 then the client gets 10% off.

I don't know if its X-0Cart of the mod, but

Here is an example of something going terribly wrong, can some one give me any guidance. I changed the name of my products to product 1,2,3..

Product1
$59.95
1
$59.95

Product2
$129.95
1
$129.95

Product 3
$58.95
1
$58.95

Subtotal:
$269.38

Discount:
$45.43

Discounted subtotal:
$223.95

Shipping cost:
$0.00

Total: $223.95

including CA State Tax 8.25%:
$20.53


I can't figure where the issue is and this is really bad!

Please any one? It seems to be State Tax Related from all my calculations.

eastman 01-29-2008 02:33 PM

Re: Free Shipping if over $X, not with a coupon
 
The mod is great, but I do have one question. I'm receiving an error when the module tries to select a shipping method.

Error: Smarty error: [in modules/Fast_Lane_Checkout/shipping_methods.tpl line 129]: syntax error: unclosed tag {if} (opened line 57).

Where is that {if} tag supposed to be placed? Here is my current code:

Quote:

{* $Id: shipping_methods.tpl,v 1.7.2.11 2007/09/26 10:35:04 ferz Exp $ *}
<table cellpadding="5" cellspacing="5" width="100%">

<tr>
<td valign="top" width="30%">
{include file="customer/main/subheader.tpl" title=$lng.lbl_shipping_address}
{if $userinfo}
{if $userinfo.default_fields.s_address}{$userinfo.s_ad dress}<br />{/if}
{if $userinfo.default_fields.s_address_2 and $userinfo.s_address_2}
{$userinfo.s_address_2}<br />
{/if}
{if $userinfo.default_fields.s_city}{$userinfo.s_city} <br />{/if}
{if $userinfo.default_fields.s_county and $config.General.use_counties eq "Y" and $userinfo.s_county}{$userinfo.s_county}<br />{/if}
{if $userinfo.default_fields.s_state}{$userinfo.s_stat ename}<br />{/if}
{if $userinfo.default_fields.s_country}{$userinfo.s_co untryname}<br />{/if}
{if $userinfo.default_fields.s_zipcode}{$userinfo.s_zi pcode}{/if}
{else}
No data
{/if}

{if $login ne ""}
<br /><br />
{include file="buttons/modify.tpl" href="register.php?mode=update&action=cart"}
{/if}

</td>
<td valign="top" width="70%">
{include file="customer/main/subheader.tpl" title=$lng.lbl_delivery}

{* ERROR: no shipping methods available [begin] *}
{if $shipping_calc_error ne ""}
{$shipping_calc_service} {$lng.lbl_err_shipping_calc}<br />
<font class="ErrorMessage">{$shipping_calc_error}</font><br />
{/if}
{if $shipping eq "" and $need_shipping}
<font class="ErrorMessage">{$lng.lbl_no_shipping_for_loc ation}</font><br />
<br />
{elseif $shipping eq "" and $config.Shipping.do_not_require_shipping eq "Y"}
{$lng.lbl_free_shipping}
{/if}
{* ERROR: no shipping methods available [end] *}


{* Select the shipping carrier [begin] *}
{if $login ne "" or $config.General.apply_default_country eq "Y" or $cart.shipping_cost gt 0}

{if $active_modules.UPS_OnLine_Tools and $config.Shipping.realtime_shipping eq "Y" and $config.Shipping.use_intershipper ne "Y" and $show_carriers_selector eq "Y" and $is_ups_carrier_empty ne "Y" and $is_other_carriers_empty ne "Y"}
<font class="FormButton"><label for="">{$lng.lbl_shipping_carrier}:</label> </font>
{include file="main/select_carrier.tpl" name="selected_carrier" id="selected_carrier" onchange="javascript: self.location='cart.php?mode=checkout&amp;action=u pdate&amp;selected_carrier='+this.options[this.selectedIndex].value;"}
<br /><br />
{/if}

{/if}
{* Select the shipping carrier: [end] *}

{* Select the shipping method: [begin] *}
{if $shipping ne "" and $need_shipping}

{if $arb_account_used}
{$lng.txt_arb_account_checkout_note}
<br />
{/if}{* $arb_account_used *}

{* nth :: loop through shipping opt and see if freeoverx is enabled *}
{foreach from=$shipping item=sm}
{if $sm.shippingid eq 333}{assign var=freeoverx_enabled value=1}{/if}
{/foreach}

{if $login ne "" || $config.General.apply_default_country eq "Y" || $cart.shipping_cost gt 0}
{foreach from=$shipping item=s}

{if (($s.shippingid eq 333) and ($freeoverx_enabled eq 1))}
{assign var=checked value="checked"}
{elseif (($s.shippingid eq $cart.shippingid) and ($freeoverx_enabled ne 1))}
{assign var=checked value="checked"}
{else}
{assign var=checked value=""}
{/if}

{if (($freeoverx_enabled ne 1) || ($config.FreeOverX_Shipping.freeoverx_shipping_met hod ne $s.shippingid))}
<table cellpadding="1" cellspacing="0" width="100%"{cycle values=" class='TableSubHead', "}>
<tr>

<td width="5"><input type="radio" id="shippingid{$s.shippingid}" name="shippingid" value="{$s.shippingid}" {$checked} {if $allow_cod} onclick="javascript: display_cod({if $s.is_cod eq 'Y'}true{else}false{/if});"{/if} /></td>
<td><label for="shippingid{$s.shippingid}">{if $s.shippingid eq 333}<span style="color: red;">{/if}{$s.shipping|trademark:$insert_trademark}{if $s.shippingid eq 333}</span>{/if}{if $s.shipping_time ne ""} - {$s.shipping_time}{/if}{if $config.Appearance.display_shipping_cost eq "Y" and ($login ne "" or $config.General.apply_default_country eq "Y" or $cart.shipping_cost gt 0)} ({include file="currency.tpl" value=$s.rate}){/if}</label></td>
</tr>
{if $s.warning ne ""}
<tr>
<td>&nbsp;</td>
<td class="{if $s.shippingid eq $cart.shippingid}ErrorMessage{else}SmallText{/if}">{$s.warning}</td>
</tr>
{/if}
</table>
{/if}
{/foreach}


{if $login ne "" || $config.General.apply_default_country eq "Y" || $cart.shipping_cost gt 0}
{foreach from=$shipping item=s}
<table cellpadding="1" cellspacing="0" width="100%"{cycle values=" class='TableSubHead', "}>
<tr>
<td width="5"><input type="radio" id="shippingid{$s.shippingid}" name="shippingid" value="{$s.shippingid}"{if $s.shippingid eq $cart.shippingid} checked="checked"{/if}{if $allow_cod} onclick="javascript: display_cod({if $s.is_cod eq 'Y'}true{else}false{/if});"{/if} /></td>
<td><label for="shippingid{$s.shippingid}">{$s.shipping|trade mark:$insert_trademark}{if $s.shipping_time ne ""} - {$s.shipping_time}{/if}{if $config.Appearance.display_shipping_cost eq "Y" and ($login ne "" or $config.General.apply_default_country eq "Y" or $cart.shipping_cost gt 0)} ({include file="currency.tpl" value=$s.rate}){/if}</label></td>
</tr>
{if $s.warning ne ""}
<tr>
<td>&nbsp;</td>
<td class="{if $s.shippingid eq $cart.shippingid}ErrorMessage{else}SmallText{/if}">{$s.warning}</td>
</tr>
{/if}
</table>
{/foreach}

<br /><br />

{/if}
{else}
<input type="hidden" name="shippingid" value="0" />
{/if}
{* Select the shipping method: [end] *}

{include file="customer/main/dhl_ext_countries.tpl" onchange=true}
</td>
</tr>

</table>
{if $display_ups_trademarks && $current_carrier eq "UPS"}
{include file="modules/UPS_OnLine_Tools/ups_notice.tpl"}
{/if}


Hopefully someone can get me on the right path. Thanks!

This is a fresh version of 4.1.9.

levo 01-30-2008 06:43 PM

Re: Free Shipping if over $X, not with a coupon
 
Quote:

Originally Posted by eastman
The mod is great, but I do have one question. I'm receiving an error when the module tries to select a shipping method.

Error: Smarty error: [in modules/Fast_Lane_Checkout/shipping_methods.tpl line 129]: syntax error: unclosed tag {if} (opened line 57).

Where is that {if} tag supposed to be placed? Here is my current code:

Hopefully someone can get me on the right path. Thanks!

This is a fresh version of 4.1.9.


----

Hi,

I think you've duplicated one of the sections. Try removing the code I've highlighted in red:

Code:

{if $login ne "" || $config.General.apply_default_country eq "Y" || $cart.shipping_cost gt 0}
{foreach from=$shipping item=s}

{if (($s.shippingid eq 333) and ($freeoverx_enabled eq 1))}
{assign var=checked value="checked"}
{elseif (($s.shippingid eq $cart.shippingid) and ($freeoverx_enabled ne 1))}
{assign var=checked value="checked"}
{else}
{assign var=checked value=""}
{/if}

{if (($freeoverx_enabled ne 1) || ($config.FreeOverX_Shipping.freeoverx_shipping_method ne $s.shippingid))}
<table cellpadding="1" cellspacing="0" width="100%"{cycle values=" class='TableSubHead', "}>
<tr>

<td width="5"><input type="radio" id="shippingid{$s.shippingid}" name="shippingid" value="{$s.shippingid}" {$checked} {if $allow_cod} onclick="javascript: display_cod({if $s.is_cod eq 'Y'}true{else}false{/if});"{/if} /></td>
<td><label for="shippingid{$s.shippingid}">{if $s.shippingid eq 333}<span style="color: red;">{/if}{$s.shipping|trademark:$insert_trademark}{if $s.shippingid eq 333}</span>{/if}{if $s.shipping_time ne ""} - {$s.shipping_time}{/if}{if $config.Appearance.display_shipping_cost eq "Y" and ($login ne "" or $config.General.apply_default_country eq "Y" or $cart.shipping_cost gt 0)} ({include file="currency.tpl" value=$s.rate}){/if}</label></td>
</tr>
{if $s.warning ne ""}
<tr>
<td>&nbsp;</td>
<td class="{if $s.shippingid eq $cart.shippingid}ErrorMessage{else}SmallText{/if}">{$s.warning}</td>
</tr>
{/if}
</table>
{/if}
{/foreach}


{if $login ne "" || $config.General.apply_default_country eq "Y" || $cart.shipping_cost gt 0}
{foreach from=$shipping item=s}
<table cellpadding="1" cellspacing="0" width="100%"{cycle values=" class='TableSubHead', "}>
<tr>
<td width="5"><input type="radio" id="shippingid{$s.shippingid}" name="shippingid" value="{$s.shippingid}"{if $s.shippingid eq $cart.shippingid} checked="checked"{/if}{if $allow_cod} onclick="javascript: display_cod({if $s.is_cod eq 'Y'}true{else}false{/if});"{/if} /></td>
<td><label for="shippingid{$s.shippingid}">{$s.shipping|trade mark:$insert_trademark}{if $s.shipping_time ne ""} - {$s.shipping_time}{/if}{if $config.Appearance.display_shipping_cost eq "Y" and ($login ne "" or $config.General.apply_default_country eq "Y" or $cart.shipping_cost gt 0)} ({include file="currency.tpl" value=$s.rate}){/if}</label></td>
</tr>
{if $s.warning ne ""}
<tr>
    <td>&nbsp;</td>
    <td class="{if $s.shippingid eq $cart.shippingid}ErrorMessage{else}SmallText{/if}">{$s.warning}</td>
</tr>
{/if}
</table>
{/foreach}


Please let me know if the above helps or not. Also, I've made a few improvements to the mod recently - I'll try to post the details as soon as I can.

Nate

eastman 01-31-2008 07:15 AM

Re: Free Shipping if over $X, not with a coupon
 
After taking that section out of shipping_methods.tpl, it changed from the message from I had before to :

Quote:

Parse error: syntax error, unexpected T_STRING in /home/eastm2/public_html/xcart/var/templates_c/%%81^812^812B57AA%%shipping_methods.tpl.php on line 109

What am I missing?

EDIT: I cleared the template cache before trying the page again and it didn't help.

Second Edit: After going through the mod again, I noticed that you did not specify which code you actually had to remove in each file. It's possible that this is the reason I'm having issues. Ideas?

hrothbeorht 02-19-2008 12:11 PM

Re: Free Shipping if over $X, not with a coupon
 
-flat rate for Nth america with free shipping for orders over 150.00$
-real-time for international. (No free shipping regardless of price.)

It looks like the best I can hope for is one or the other.
I hope I'm wrong.

-hroth

pig@pp 07-14-2008 02:38 PM

Re: Free Shipping if over $X, not with a coupon
 
Installed the mod as described and it appears to have installed correctly (ie no errors). If we ONLY offer UPS Ground shipping how will this effect the function of this mod? Right now the cart isn't showing Free Shipping when the total is over $X.

microdaq 08-22-2008 11:35 AM

Re: Free Shipping if over $X, not with a coupon
 
Hello,

Has anyone been successful with getting this mod to work on 4.1.10 with FedEx Rate Tools (imported rates) or with the Ship Manager Direct option?
I am currently using rate tools but will eventually use the Ship Manager Direct Option.

Also, whos version is better, the original from spingray or the recent version from levo?


Thanks
Steve


All times are GMT -8. The time now is 07:51 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.