I am developing a website in Opencart version 2.3. I have to change the price of the product based on user location and weight of the selected product. I am getting the User City from a popup in my home page. That stores the City name in session. I am storing the cities in a separate table. Every Product will have a weights of 250 grams, 500 grams and 1kg.
My requirement is to get the price of the item based on both location and weight. Each city will have different price for the same product.
Can someone suggest me how to achieve this. Explanation in a theoretical way is fine. I can code for that. I just need help with the approach.
Go to Admin --> Settings -->Localisation -->Geo Zones
Create your geo zones and then head over to Extensions --> modules--> shipping
Select weight based shipping
Click on your zone, add weights and prices in this format:
250:200.00, 500:400.00, 1000:800.00 (weight:price)
Enable the zones and save.
Related
I have one virtual product in my backend. The flow is like user can purchase this product with different dynamic option. But I can not add that option in backend as custom option as those option is dynamic.
I want to add this product to cart with that option without create custom option in is it possible ?
For Example :
I have one virtual product that is Tour Package. User can purchase that package but with different duration and price and type. Tour type is dynamic admin can add this from backend. Tour type like golder, silver etc.
Duration is like 1 week, 2 week, 1 month this duration is also dynamic admin can add duration while create tour type.
Now I displayed this tour type in front-end page and added button to add to cart with that virtual product.
Now the issue is that if user purchase Gold tour then I want to pass "Gold" as addition option in cart. and if user select other tour at same time then that product should add to cart individually.
Please give me any solution.
David,
you can do it via Admin panel of Magento 2.
Go to Catalog > Add product. Choose Virtual product. Then edit it and add all information you need (such as name, price, category, etc). Once you are done with this settings scroll down to Configuration. At step 1 you should create and choose needed attributes, at step 2 you should select values from each attribute. You should go through all the steps and save them. Then put price and quantity.
We prepared some screenshots for you to help in this process.
I am designing a grocery website in wordpress where in I wish to display price per kg for vegetable and user will now enter the weight they wish and price should get recalculated and displayed and added to cart(after user click on add to cart button).
I have tried few plugins like Price per product and Price Measurement but nothing seems to work. How can this be achieved?
Just multiply the price per Kg by the weight requested to get the price.
I've got the following scenario:
Regular category
Sales category
I will sort countries by zone to make the explanation easy:
Lebanon, zone A
(some countries), zone B
(all remaining countries), zone C
Shipping is based on the total purchased amount, and not on weight, so the conditions to calculate the shipping cost are the following:
If shipping in Lebanon, the category is not "sales" and the price is below 50$, then 3$, otherwise free shipping.
If shipping in zone B, the category is not "sales" and the price is below 100$, then 15$, otherwise free shipping.
If shipping in zone C, the category is not "sales" and the price is between 0$ and 149$, then 50$, otherwise if the price is between 150$ and 199$, then 30$, else free shipping.
What is the best practice to implement this kind of shipping prices in Magento?
Here is the step-by-step guide:-
– Go to System –> Configuration –> SALES –> Shipping Methods –> Table Rates
– Select ‘Enabled‘ to ‘Yes’
– Click the ‘Save Config‘ present in top right corner of the page
– From the ‘Current Configuration Scope‘ (which is at the top left corner), choose ‘Main Website‘
Now, you will see as in the following figure:-
Tablerates Configuration
As you can see from the figure, there are three main parts:- Condition, Export and Import.
– As we are making different shipping rate for different country, so select Condition = ‘Price vs. Destination’
– Click ‘Export CSV‘ and a csv file is downloaded with the required headers like country, region, shipping price, etc.
– Fill the csv with the shipping rate and country name. For example, see the following figure:-
Tablerates CSV
– The asterik (*) in region and postal code column means that the shipping price is applicable for all regions and postal code respectively.
– The zero (0) in order subtotal means that the shipping price is applicable for all orders whose subtotal is greater than zero.
– In the last row (7th row), you can see ‘AK’ as region. Hence, comparing the 2nd row and 7th row where the country is USA, we see that the shipping price for all other US region is 10. But, the shipping price for AK (Alaska) is 15.
– Now, Import the csv you just filled.
– Click ‘Save Config‘ button present in top right corner of the page.
– You are done. The new country specific shipping rate has been saved. You can test it by checking out products from frontend.
Hope this helps. Thanks.
I want to add a checkbox to products in certain categories in my online shop, but when the checkbox is ticked it will need to add 'x' amount to the total of the product.
To complicate things further, the product is total is calculated by (area x product price) after the user has inputted their required Length and Width, the checkbox will need to use the area value and then multiply the area by 2.5 and then add that sub-total to the grand total of the product. It's an add-on to the product. If you catch my drift?
Here's a link to a sample product page. The products are carpets, so when you to tick the checkbox, the carpets will have a stain protection applied and will be charged for.
Is there any snippet of code that could help me here?
So it was a relatively easy solution. It was just a case of turning the product into a variable product and using attributes to make a "yes or no" drop-down box, with one of the options having an increased price. This makes the price change before the area is calculated, unlike the 'product add-ons' plugin, which adds on after.
I can't believe it took me two weeks to find the answer to this.
I'm working on a Magento site that has a number of simple products. There's also a "holiday package" which combines several simple products into one, at a discounted price:
6 of Item A
2 of Item B
2 of Item C
2 of Item D
The "grouped" product type is pretty close to what I need - it allows each item to keep track of it's own stock, and when it comes time to ship and estimate packages, it tries to pack the containers using the weight/volume of each individual item. (This shipping aspect is very important, as we need to pack the boxes as efficiently as possible - using a simple product with an estimated size for all items may not work).
However, we do not want the customer to be able to choose the quantity of each item. The customer should instead be asked to choose how many holiday packages they would like.
Is a grouped product the best approach? Is there a better way to handle this?
In Magento 1.5.1, the best solution should be the bundle product. There, you can define a price, a quantity for each item in the backend. You can block the user to change the quantity for these items, not for the bundle product (you could too if you want but it's not your need here).
We do like that for some of our product. Check the screenshot to see an example of configuration