Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Remove "state/municipality" Field From Shipping Calculator Rate Topic   - - - - -

 
  • Vivi
  • Member
  • Members
  • Join Date: 03-Jun 15
  • 29 posts

Posted 31 July 2016 - 11:44 AM #1

Hi,

When the customer goes to the "View cart" page and clicks "Calculate shipping", there are two fields under the country dropdown - "State/municipality" and "Zip code". How can I remove the "State" field? My CS cart (v. 4.3.1) is not set up with states within my country, so the shipping calculator will not show the proper shipping fee if the customer fills out this field. It only works properly if the zip code is input.

Thanks in advance for any help :)

 



 

Posted 01 August 2016 - 06:10 AM #2

Hi,

When the customer goes to the "View cart" page and clicks "Calculate shipping", there are two fields under the country dropdown - "State/municipality" and "Zip code". How can I remove the "State" field? My CS cart (v. 4.3.1) is not set up with states within my country, so the shipping calculator will not show the proper shipping fee if the customer fills out this field. It only works properly if the zip code is input.

Thanks in advance for any help :)

 

Comment the following part of code:

<div class="ty-control-group">
                    <label class="ty-control-group__label" for="{$prefix}elm_state{$id_suffix}">{__("state")}</label>
                    <select class="cm-state cm-location-estimation{$class_suffix} {if !$states[$_country]}hidden{/if} ty-input-text-medium" id="{$prefix}elm_state{$id_suffix}" name="customer_location[state]">
                        <option value="">- {__("select_state")} -</option>
                        {foreach $states[$cart.user_data.s_country] as $state}
                            <option value="{$state.code}" {if $state.code == $_state}selected="selected"{/if}>{$state.state}</option>
                        {foreachelse}
                            <option label="" value="">- {__("select_state")} -</option>
                        {/foreach}
                    </select>
                    <input type="text" class="cm-state cm-location-estimation{$class_suffix} ty-input-text-medium {if $states[$cart.user_data.s_country]}hidden{/if}" id="{$prefix}elm_state{$id_suffix}_d" name="customer_location[state]" size="20" maxlength="64" value="{$_state}" {if $states[$cart.user_data.s_country]}disabled="disabled"{/if} />
                </div>

in the design/themes/[THEME]/templates/views/checkout/components/shipping_estimation.tpl file.


Sincerely yours, CS-Cart Support Team

 

User guide       |  Developer documentation  |  Core API documentation


 
  • Vivi
  • Member
  • Members
  • Join Date: 03-Jun 15
  • 29 posts

Posted 04 August 2016 - 03:48 PM #3

Hi,

Thanks for your reply!

I found that part of the code and I commented out with a <!-- before and a --> after it yesterday. I then went into the admin and clicked Clear cache.

Since nothing had changed, I tried again today. I was unsure if the commenting out worked, so this time I deleted those lines. I saved the file and logged into the admin and clicked Clear cache again.

I also tried clearing the cache in my browser and clear cache in the admin section of cscart.

But the State field still remains. What am I doing wrong?



 

Posted 05 August 2016 - 05:46 AM #4

Hi,

Thanks for your reply!

I found that part of the code and I commented out with a <!-- before and a --> after it yesterday. I then went into the admin and clicked Clear cache.

Since nothing had changed, I tried again today. I was unsure if the commenting out worked, so this time I deleted those lines. I saved the file and logged into the admin and clicked Clear cache again.

I also tried clearing the cache in my browser and clear cache in the admin section of cscart.

But the State field still remains. What am I doing wrong?

 

Try to clear it manually by deleting the var/cache directory.


Sincerely yours, CS-Cart Support Team

 

User guide       |  Developer documentation  |  Core API documentation


 
  • Onkel_Sid
  • Junior Member
  • Members
  • Join Date: 04-Sep 10
  • 301 posts

Posted 05 August 2016 - 07:56 AM #5

Here is an addon that lets you choose the fields that should be visible in the "choose shipping window":

 

http://marketplace.c...ion-fields.html


Stop smoking start vaping: Dampskyen.no


 
  • Vivi
  • Member
  • Members
  • Join Date: 03-Jun 15
  • 29 posts

Posted 06 August 2016 - 10:46 AM #6

Thanks for everyone's input, it works now after manually deleting the var/cache directory :)



 
  • tomcatq8
  • Newbie
  • Members
  • Join Date: 17-Apr 18
  • 1 posts

Posted 17 April 2018 - 07:21 AM #7

Hello

 

I'm having similar issue, but cannot find this location: 

 

design/themes/[THEME]/templates/views/checkout/components/shipping_estimation.tpl

 

I'm using version 4.7.3 mv, has this location been changed?

 

Thanks



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 17137 posts

Posted 17 April 2018 - 01:04 PM #8

The code should be there. If you use 3rd party theme, try to find necessary file in the parent theme. Usually it is

 

design/themes/responsive/templates/views/checkout/components/shipping_estimation.tpl


DISCOUNTS UNTIL APRIL, 27! GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 305     Multi-Vendor              USD 1150    CS-Cart RU                         21500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 505      CS-Cart RU + UniTheme    33000 руб.