Opencart - file option and price calculation - php

i'm trying to make e-shop for business cards, brochures and etc printing. So main option is file upload option.
The problem is that opencart not recalculating prices if user uploaded different files. Lets say customer want to order 100 business cards with one picture (price is 0.2$ each when amount is 100 ) and 1000 business cards with another picture (0.1$ each when amount is 1000), in total it should be 120$, but opencart showing 110$ :
-business card (file1.pdf) x100 0.1$
-business card (file2.pdf) x1000 0.1$
Total 110$
i want that prices would be recalculated if uploaded files are not same :
-business card (file1.pdf) x100 0.2$
-business card (file2.pdf) x1000 0.1$
Total 120$
How can i do this?

I guess the solution could be very simple:
make the default business card price like $0.35 for less then 100 pcs ordered
set a discount on that business card product in this way:
more than 100 pcs ordered - price is $0.2 for a piece
more than 1000 pcs ordered - price is $0.1/pcs
now when client orders 100 pcs (one product, one file) and another 1000 pcs (same product, different file - should be different option), the price(s) should be calculated accordingly.
e.g.
100x BusinessCard (file1.pdf) $0.2 = $20
1000x BusinessCard (file2.pdf) $0.1 = $100

Related

Manage new product and old product price in e-commerce sites

I am working on e-commerce website in PHP (Code-igniter framework). i am facing one challenge.
The Problem detail is
I have product (name: xyz). the quantity of xyz product is 30 and it's each xyz product price is 120. then i buy more quantity (150 quantity) of xyz product at price 100.
if I show on website xyz product with price 120 (old price) and
total stock remaining 180 then user will not buy because price is
high and user will buy to another website.
if I show on website xyz product with price 100 (latest price)
and total stock remaining 180 then i lost 600 dollars (20 price x 30
quantity)
What can i do to solve this problem ?
Please provide any suggestion about this problem
For such purposes, you can use SKU.
In your case, this is worth 1 product but with different price, as the purchase price was different. More details can be written here. Good luck!
i have solved the issue
if I show on website xyz product with price 120 (old price) and
total stock remaining 180 then user will not buy because price is
high and user will buy to another website.
if I show on website xyz product with price 100 (latest price) and
total stock remaining 180 then i lost 600 dollars (20 price x 30
quantity)
the solution is: Production Company is responsible to exchange my remaining inventory with new price
If you're using mysql do this on your query:
GROUP BY concat(ProductID , '-' , Price)
This will list your products separated by it's price.

How to change Shipping Cost per two product in woocommerce?

I am using woocommerce plugin in a wordpress site.
The shipping method is to be calculated on the basic of USPS Priority 1-Day mail $5.75 per pound (lbs).
Each shirt ways 1/2 a pound in weight, so 2 shirts should not be charged additional shipping.
Means I want to calculate the shipping method for per two shirt i.e. $5.75 not as cost per product.
then the shipping will be calcalated as like ths
3 -4 shirts $11.50 and 5 shirts $17.25 etc...
The basic requirement is if I would be able to change the shipping cost per product to per two product the query will be solved. How Can I get this method.
Any help will be appreciated.

how to add package weight to total cart weight in woocommerce?

How to add package weight to total cart weight in woocommerce?
For example total weight of cart is 1800 g and the package weight is 400 g, then the shipping plugin calculates the weight as 1800 g, but the real weight of package which being used by shipping company is 2200 g.
Then the seller must pay this additional fee(for 400g) from his own pocket.
Is there any solution?
How can I use $cart_contents_weight ?
I had the same problem and didn't find any official solution. But there is an easy hack for the system, set the weight limits lower with the package weight!
I.e. if the price range limits are 1000 and 2000 grams, set 600 and 1600 grams instead. Using this method, an order of 1800 g will be already in the second range, where it should be.
Unfortunately, if the package weight varies, this method isn't perfect. I'm selling small goods in the same small parcels so I deducted 60 grams from each weight limit and the system works fine for me.

how to implement dynamic calculating price in magento based on weight ?

Hi i’m developing a eCommerce site in Magento for jewellery business and its based on a “weight”, not the price because gold rate is changing in day by day or more then 3 times in a day.So it is not possible to change the product price every time according to gold rate. Then, how to manage the prices on this scenario?
Example case: Today I have added a 18K gold ring of 10gm to my site and right now gold rate is Rs30,000 per 10gm, so today price of this ring is Rs30,000 but, Next day the rate will be changed (Rs32,000 per 10gm) then, my product price must be changed from Rs30,000 to Rs32,000.
This is not possible to update the price of all products every time.
I am using Magento platform. Please, Share your idea regarding this situation.
To make this simple, you should work on a 2 ways solutions.
In the frontend, do not show price ($_product->getPrice()) but just show the real price according to weight.
Example if you have price/grm stored in the backend use $product->getWeight * Mage::getStoreConfig('mycompany/gold/dayprice').
That way price will be shown dynamically in the product page or list page.
Now you should use an Observer on the add to cart event to change the price to the good one.
This way, don't matter what price is set on the product because showing and adding will use the formulae.

Tier Price not displaying Magento

I'm new to magento. I have one product having tier prices as follows:
a) 500 and above -> $46
b) 1000 and above -> $43
c) 1500 and above -> $39
And the Price(Actual) of product is $46. So on product detail page,
It's not showing the first tier price (a). See below:
Buy 1000 for $43 each and save 7%
Buy 2500 for $39 each and save 16%
Though the Actual price and minimum tier price are same, how can I display the minimum tier price in the above list. Please help. Thanks in advance.
Make sure your base product price is bigger then $46... If your base product price is lower then the tier price, the tier price wont show up.

Categories