I see there is a field under each customer address with Residential/Commercial as the options.
Is there any way to set up a shipping rule based on whether it is a residential or commercial address?
address_type is an enum field of the customer address object that can be set to residential or commercial. There is not built-in support for setting shipping rules on this via BC. You can use ShipperHQ to accomplish something similar.
Related
I am using "ConvertPlus Default" Checkout Theme in 2Checkout to accept international payments from my customers across the world. I generated the Buy Link and integrated with my store.
My issue is that the Checkout Form is not showing fields to input Address and City for many countries including Mexico, Japan etc. Refer screenshot below:
How do I enable the option to accept Complete Address information for all countries across the world?
Buy Link looks like this:
https://secure.2checkout.com/checkout/buy/?merchant=\[MerchantID\]&prod=\[ProductID\]&qty=1&tpl=default
You should add the tangible parameter
Send tangible=TRUE or tangible=1 for products that require physical delivery.
As of 10/01/2019 the parameter you will need to enable shipping is
li_#_tangible
The documentation says this.
Specifies if the corresponding li_#type is a tangible or intangible.
( Must be Upper Case, ‘Y’ or ‘N’, if li#_type is ‘shipping’ forced to
‘Y’.)
Where # is the parameter number. Because you can send multile items in the same POST so it will appear as multiple items in the 2CO cart.
Here is the full documentation about parameters,
https://www.2checkout.com/documentation/checkout/parameters/
Hope this helps someone.
Cheers.
I'm using vatlayer API for getting company information by put in the vat number. https://vatlayer.com/documentation
Now I want split address info in the state, zipcode, addressline and address number.
I get the address info: BREDABAAN 13052900 SCHOTEN.
The address number and zipcode stands against each other without spacing. (1305number and 2900 zipcode).
Is there another API for working with the vies database where i can split these information? Or an work around for this bug?
VatLayer don't support the split atm.
I get the address information by:
$("#organisation_address_line_1").val(json.company_address);
Thanks in advance,
There's quite a lot of API's to handle VAT validation but the ones that provide information about the trader essentially all rely on the official API at http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl . It connects directly to the VIES system. Perhaps the values returned there are a bit different: it's worth trying your validation that way as well.
Unfortunately, since VIES does not return structured addresses (except for approximate matches, but only Spain supports them at the moment) and does not specify a common format for the free text addresses, you're going to have to deal with whatever format the country has chosen to provide, which means manual parsing.
I reckon 3rd party wrapping API's could handle guessing the format and splitting the formats on their own but I am not aware of any that would do it.
In Prestashop 1.6.
I don't understand why the Carrier Name field is not translatable anymore.
I found serveral topics just saying that this was posible in older versions but no now. But why?
I have names like: "Standar Delivery" How are we supposed to translate these names?
Is there other approach to work with carriers and languages?
thanks.
There is no way to translate carrier names and there is issue (improvement) opened in PS Forge since 1.4. I think the reason behind is that carrier usually has a name, e.g. DHL which does not need to translate.
I see in merchants' stores they use store's name as carrier. e.g. if you have Shop ABC, then carrier name would have the same name - Shop ABC.
If you have more than one carrier, e.g. Priority Shipping, Standard Delivery, etc. then it won't work. My suggestion would be to use Standard Delivery and below there is a field named Transit time which is translatable. It is actually the same as description so you can add short description about each carrier in different languages. Customers won't need to know which type of delivery is offered by the carrier name, they can read description next to its name.
Also it would be good to have informational (CMS) page about delivery types and costs. I would say it is a must for an online store.
i have done this before for PrestaShop 1.6
I know it's possible but you need to modify 2 files and you need to adjust the database.
I have set two shipping method that use flatrate (using CATEGORY_REQUIREMENT_MATCH_ANY) and checked the code in MethodsResolver->getSupportedMethods and it returns the two shipping methods. I just can't see them in the frontend at http://sylius.dev/app_dev.php/checkout/shipping and don't know whats wrong.
Can someone please help?
I suggest it would be one of these:
shipping methods are not enabled in your channel
check in your administration channel settings administration/channels
see if you have chosen shipping method for your web/frontend chanel.
shipping methods have zone restrictions
check in you shipping method configuration, if you don't have it allowed only for specific county/zone
also check if you don't have shipping category set with for those methods.
products have zone or shipping category restriction
check if product(s) that you have added, are not restricted by zone or shipping category
this can be set on editation of each product in administration.
try if same happens with demo.sylius.org
can you replicate the same behaviour on the demo page ?
For my example, I have a Person class with an arbitrary number of associated Addresses associated with it. So there will be an Addresses collection as a member of the Person class.
In many applications which use the Person class, we will just want to retrieve the "Default" Address object. There are a few design questions regarding the implementation:
On each Address record in the DB, I could have a flag to set whether it is default for the collection. Alternatively, I could have different types of addresses (Home, Billing, Shipping, etc...) and set up rules to say that if a person has a Home address record, use it as the default. If not, then use Shipping, etc...
As for the interface used to retrieve the default Address, there are many ways we could do it, and I'd like to know what feels best to some of the SO folks.
Address a1 = myPerson.DefaultAddress;
Address a1 = myPerson.Addresses["Default"];
Address a1 = myPerson.Addresses.Default;
It's probably good advice to say, "It depends on your application." Let me preempt that by saying we're building some foundational classes for all of our new development. So I can't necessarily just look at this first app we're building as the final word on class design.
If you set the flag for each record in the DB, you will have the widest functionality. Hardcoding the rules for which address to show as default, will limit your design.
For number 2, the third implementation sounds like the most object oriented.