Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Hide USA from the Dropdownlist View modes: 
User avatar
Certified Developer v7
Certified  Developer v7
Gitesh - 8/18/2011 8:21:20 PM
   
Hide USA from the Dropdownlist
HI Guys,

I am working with the e-commerce shopping cart pages.

1. How can I remove USA from the country list on shipping address page?
2. When someone goes to the Payment gateway and back button , it comes back to the site and all the data of the customer is lost in the shopping cart but shipping price stays to whatever was selected.



Thanks
Gitesh Shah

User avatar
Kentico Developer
Kentico Developer
kentico_helenag - 8/21/2011 9:28:12 AM
   
RE:Hide USA from the Dropdownlist
Hi,


If you want to remove USA in the whole installation, you can remove it in Site manager -> Development -> Countries.

If you want to hide it only in that form control, you can add a Where condition to:

~\CMSFormControls\CountrySelector.ascx

for example like: WhereCondition="CountryDisplayName <> 'USA'"


Best regards,
Helena Grulichova

User avatar
Certified Developer v7
Certified  Developer v7
Gitesh - 8/21/2011 8:54:05 PM
   
RE:Hide USA from the Dropdownlist
Hi Helena,

I tried deleting USA from the countries list, but gives me the below error:

Error: The selected item cannot be deleted because it's used by other records. You need to remove it from the related records first.

I tried to solve the error but not sure where else the country USA is being used?

OR

On which line shall I add the where condition, an example would be great.

Thanks
Gitesh Shah

User avatar
Kentico Developer
Kentico Developer
kentico_helenag - 8/22/2011 2:14:24 AM
   
RE:Hide USA from the Dropdownlist
Hi Gitesh,


1. You have to delete the States of a country like: Site manager -> Development -> Countries -> edit USA -> States -> delete all of them.


2. There is a control:

<cms:UniSelector ID="uniSelectorState" runat="server" DisplayNameFormat="{%StateDisplayName%}" ObjectType="cms.state" ResourcePrefix="stateselector" />

in the Country selector and it can have a property called WhereCondition.


Best regards,
Helena Grulichova

User avatar
Certified Developer v7
Certified  Developer v7
Gitesh - 8/22/2011 4:22:12 PM
   
RE:Hide USA from the Dropdownlist
Hi Helena,

I have deleted all the states of USA but still it gives the same error.

What else could be related to it?

Thanks
Gitesh shah

User avatar
Kentico Developer
Kentico Developer
kentico_helenag - 8/24/2011 2:06:56 AM
   
RE:Hide USA from the Dropdownlist
Hi Gitesh,


can you check CMSDesk -> Tools -> E-commerce -> Configuration -> Tax classes? There should be no value for USA if you want to delete it. If you have already some customers in your system (CMSDesk -> Tools -> E-commerce -> Customers), please check if USA is in their addresses or on their General settings (CMSDesk -> Tools -> E-commerce -> Customers -> General).


Best regards,
Helena Grulichova