Magento 1 wrong Shipping rates - php

we are using Webshopapps Product Matrix Rates pro version
after asking the developers of this extension they are saying that it's NOT the extension that is causing the issues as the logs say it's returning the correct values.
We have a shipping matrix setup for UK postcodes that requires a delivery charge for certain UK postcodes this is on a multi site setup which as 2 sites.
What should happen is per pallet added to the cart it should add £4.80 where a charge is required based on the postcode entered, so If I have 2 pallets the shipping cost to the postcode would be £9.60 and £4.80 for each extra pallet added there after, for the economical 2-3 day delivery.
On site one if I add 5 pallets the shipping cost is coming back at £28.80 where it should be £24
On site two If I add 5 Items the shipping cost is coming back at £9.60
I have no Idea why it is doing this as both sites are using the same code / theme apart from the logo and CSS for the colours of the site.
If anyone has any suggestions for a fix it would be much appreciated.
sorry I can't put code here or setting as I have no idea what I need to post for you to view.
Regards
Mal

Sorted, turns out after the developers going through the logs and a lengthy chat, which the boss remembered something very important they had done on the products on the other site I was trying to match, once I found this out it all made sense and got it working correctly, so there wasn't any bugs and it's working correctly all along ARGH!!!!
Basically any products on the first site where the weight was over 850KG was set to 850KG regardless.
on the new site the correct weights have been added, so anything over 850KG was adding the extra cost, then they didn't update the CSV to reflect this.

Related

Prestashop: Custom vouchers based on weight (PHP)

I'm working in a prestashop store for a client. He wants to focus on the clothes weight to set the price so I've modified all the tpl files needed to display this attribute accordingly. However, I'm experimenting some issues to find an approach to generate custom vouchers based on the total cart weight.
The idea is when a customer reach, in example, 0.5 kg, he or she automatically gets a discount code. Difficult here is that PS/Settings only set vouchers based on price rules. I thought that maybe I could work with a php or tpl backend file but vouchers are related with the database. Taking all in consideration I'm wondering if some of you have tried this kind of modifications and could advice me about what files I should be working with and what kind of code functions a I will need.
Thank you in advance!!

Remain constant Woocommerce prices regardless of tax rate - B2C

Note - im new, so please be kind. If anything isnt clear please tell me, so i can improve my questioning!
As a person who lives in europe and sells products to end-consumers, the following problem is very ipmortant and in my opinion heavily under-prioritised.
There are a lot of conversation regarding this issue. In the following one #MikeJolley (owner of the wocommerce github repository) was also involved(github.com issues/4131) and linked to the site - How Taxes Work in WooCommerce where you can find the following filter to remain the prices constant regardless of the tax rate
add_filter( 'woocommerce_adjust_non_base_location_prices', '__return_false' )
By using the filter you can achieve the following:
Example 1: Selling from GB (with their 20% tax rate) to Germany. The price of the product is 9.99 including tax. GB based sellers do not need to charge tax for physical goods in Germany.
Price = 9.99 (the same)
Tax = 0 (no tax is charged
The German would pay 9.99 for the product, the same as GB people.
Example 2: Let's take the same above example, but consider a digital good where tax would apply of the rate 19%.
Price = 9.99 (the same)
Tax = 9.99 / 1.19 = 8.39 (slightly less than GB)
The German would again pay 9.99
The Problem:
For a few weeks i put the filter in my functions.php and solved the isse, unfortunately after the last Woocommerce update the mentioned filter triggers the following post call - wich executes in a infinite loop - again and again (see firebug network tab).
https://testsite.com/online-shop/?wc-ajax=get_refreshed_fragments
My request
Any idea how to solve this Problem - or any other way to remain the prices constant? Im not interested in heavy or paid Plugin solution wich slow down my site. Thank you so much
EDIT:
After some research i came across with the following:
Refresh fragments infinite loop #10940 and Fix for #10940 - wc_cart_hash
It seems there is woocommerce bug wich is still not resolved entirely. I closed my other windows and the problem is gone. What a waste of time...
After some research i found the problem. It is a woocommerce core problem - look at Refresh fragments infinite loop #10940 and Fix for #10940 - wc_cart_hash
wc_cart_hash was used as a key for localStorage
for all WooCommerce sites. If you were to load your
cart for two different sites in the same browser,
the two WooCommerce pages would contend over this key
and loop on trying to set this key in the localStorage
This commit prepends the site's ajax URL onto the wc_cart_hash
key name in localStorage, providing a unique key for each
WooCommerce site. This ends contention over the keys.
It seems the woocommerce bug is not resolved entirely...
I closed my other windows and the problem is gone. Hope this helps others with the same problem.
UPDATE:
The problem also happens if you open a new Tab where you view a live preview (under Appearance - Themes) of another woocommerce theme in the backend... In my case i checked a few changes of a earlier theme.

Incorrect shipping calculation in Magento

I have a Magento site which uses the webshopapps matrixrates plugin for shipping rates.
The shipping cost doesn't seem to be calculating correctly and appears to apply a discount to the product cost.
In the screenshot below, the basket contains one product that has a price of €30, the shipping option 'European Airmail' (€5.50) has been selected.
Therefore the total cost should be €35.50
However the cost comes out at €30.55.
It's almost as if the Delivery cost is subtracted from the total (ignoring euro cents)
Interestingly there are two instances of this site, the UK instance appears to work correctly but I can't find anything different in the config.
I've tried comparing a CSV export of shipping rates but can't see anything obviously different.
What do I need to do to get the cost to come out as the correct amount (€35.50)?
Any suggestions welcome!
EDIT
If I dump out the quote object, the price for the product shows up as 25
But if I just load the product and dump it's data, I get the actual price which is €30:
I've got the tax amount with:
<?php
$taxAmount = $quote->getShippingAddress()->getData('tax_amount');
?>
And that comes back as 0.000
So I'm at a bit of a loss as to what is going on here.
Got to the bottom of this, it was a catalogue price rule for free shipping upto 4.95..
I had removed all shopping cart price rules already but wasnt aware that anyone had created a catalogue price rule so didnt consider it. Thanks for the suggestions guys.

Woocommerce: Multiple Shipping Classes for one product

First of all, thanks to everyone for your contribution to stackoverflow - you helped me hundreds of times. Now, I really have a question I can't find. :(
I'm using the latest Woocommerce for Wordpress. In Woocommerce you can create shipping-classes and assign them to the products you upload. This helps you for creating "complex" shipping methods.
However, I wan't a very complex shipping method. How can I make it possible that I can choose multiple shipping-classes per product and not just one? I am not an expert in programming :(
I'm using table rate shipping also. So what my final goal is:
Product A:
Shipping-Class - local post rates
Product B:
Shipping Class - Chinese Warehouse
Shipping-Class - local post rates
Why I want this?
I have a warehouse in Thailand and one in China. People ordering products and some I have to collect from the Chinese Warehouse. The Products from China will come to my place and there I will put them in the same box as those products from my local warehouse. Currently my shipping system thinks "This dude makes two boxes and send two boxes to one customer". So my customer has to pay way to much delivery. I need to be able to tell my programm that I order from different warehouses but in the end I put all together in one box.
Thank you so much for your help!

Limit product price to not pass beneath zero when using product options with negative values

I'm trying to use Opencart as a system to buy from clients, not sell, which I know can be done. I'm not sure as to how much coding needs to be changed or added, but I don't think it's too much that has to be done. I have done a lot of research and have tried doing my own work to get this working as I described, but have had no luck. Not even on Opencart community forums.
I'm going to try to be as elaborate as I can into describing what I have done and what my problems are because I wish to get this resolved and working as planned.
Problem #1 - Negative Integers to Zero on Products (but not removing them from options)
Since I buy from Clients, I have added product options with negative integers which reflect the base price of a product (whether it's damaged, missing components, etc.) that we will pay for. There are options where it will put the Price to a negative value, which I do not want to happen. I want the price to not pass beneath $0.00 and to also make sure this value carries over to the shopping cart. I have done a lot of research on PHP coding to do this, and I'm not sure what to edit to make this happen or even if it will work as I desire or even if it's the correct way of doing it.
Problem #2 - Instead of a traditional Shopping Cart check out with payment options, provide only an invoice that is also e-mailed to both the client and myself.
Since we do not sell products but buy them, we don't pay for anything until we receive the clients products to verify it's condition.
I will provide any code necessary from core files of Opencart.

Categories