Calculate, display and add price based on weight n wordpress - php

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.

Related

Show product variation as single product in woocommerce

I have a woocommerce shop with 3 products (rolling lawns). These products have many different pricing configurations based on geolocation (for delivery) of the customer and quantity(meters) selected. So for all the different quantity levels (below 60 meters, below 100 meters,...) and the zip code I have a product variation for this product with its own price. Now a requirement is that on a specific page I have to show, based on the input of zip code and quantity, a product which the user can add to cart. The price has to adapt to the input of course, thats why I want to use the variation which has the price per meter and multiply it with the quantity. I cannot figure out how to display the needed variation as a product where the customer can click "add to cart". Is this possible? Or have I failed the topic and should solve this a total other way and not with variations?

Magento Product "Custom Options" Percentage

My Magento store is running 1.9.1.0. All of the products within my store have a default price of $0.00 because the price is determined from "custom options" that are selected within a product's page.
Although, one of my "custom options" for a product is based from 15% of the entire product's price. For some reason, it does not work. I am assuming that it does not work because the default product's price is $0.00 and it does not take the price after all of the custom options have been selected into consideration.
I would like some guidance on how I can make it so that the "custom option" for 15% takes into account the full amount after all custom options have been selected.
Thank you for your help in advance.
here is two way to do this work
Way : 1
If your Product Price is $0.00 and you want to change the Price 15% as per the option
then you can try the Group Product in Magento
here you have the base Product Price is depend on the Selected Products Price
Way : 2
You can create a attribute based on the Price like : tmp_price and put the product Price here and calculate the 15% of the Price of the option using the customization
let me know if can help more in this task

Want to add a checkbox to product page on woocommerce/measurement calculator plugin

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.

How to display promotion price when qty is 0 in magento

I am building an online shop where I want to display on the category page and also on the product page the special price also when the qty is 0 and stock is manageable. The idea is to say that the product can be on demand in 24-48 hours and it has a discount but the product is not in actual stock of the client but it can arrive to the customer in 24-48 hours.
How can I make this in Magento because when I look now is taking only the original price and not the promotional price when qty is 0.
in magento version 1.9.1.0 it displays product with special price if it is out of stock so no need to change in code in magento. if not display there then use
echo $_product->getFinalPrice();
for display promotional price.
From what it appears you simply want to discount active in stock products and stop doing so when they're out of stock and then notify the customers that they have a lead time of 24-48 hours if so.
There's a Magento inventory option to do just that:
admin/system_config/edit/section/cataloginventory
Then you need to add a promo that discounts products that are quantity > 0
The promo would reduce necessary products to the 'regular price' but not if their inventory is 0.
admin/promo_quote/new
By default Magento does not give you those promotions so you'd have to use a third party module for such detection/discount such as Amasty which has some of the most robust, stable, compatibly modules in the business:
https://amasty.com/

How to show product total price calculation in Magento cart

I'm having problems trying to show the product full total price in Magento, and by product total price I mean full product price without the discount; the price has to be multiplied for each product quantity added to the cart, and custom options additional price should be added as well. Which files should I edit in Magento? is it possible to show the product discount inside the cart (amount that varies with the amount of ordered products)?
Thanks
Edit:
screenshot
In the blue rectangle it shows the regular price, which should be regular price X 2 (since product quantity is 2) with added 122€ as chosen in product special options. Instead now it shows regular price with discount applied and for only 1 product, without special option added.

Categories