wooCommerce shipping quantity issue - php

I have an e-commerce website based on wooCommerce. I have some shipping restrictions with the Shipping Company.
I can only ship 6/12/18 products. For shipping currently I am using Table Rate Shipping plugin in which I have set free shipping for zone and for 6/12/18 products. With this I am using Minimum Purchase Rule for minimum 6 quantity for the cart.
But customers can add 7/8 products and shipping method is allowing it (as the minimum cart limit is 6) which should not be allowed.
So is there any way we can restrict quantity in between 6-12-18?
One more thing, when I enter straight 7/8 products it gives me shipping error as this quantity is not allowed but when I enter combination of products like 6+1/5+3 it is allowing it.
Thank you!

Related

Disable Free Shipping when shipping is enclosed with multiple products

I'm looking to exclude free shipping when I have another shipping option in my cart.
Each painting (on the paintings page) has 3 options, only one option has shipping. If multiple paintings are purchased and at least one has shipping, I don't want free shipping to be an option.
Example:
Painting1: Qty 1 $15 shipping
Painting2: Qty 1 $0 shipping
Shipping Options
Total Shipping: $15
Local Pickup
This is the site I need help with: http://philvassilart.com/

Magento products sold at price zero and only shipping was charged

I am working on E-Commmerece site which is based on Magento Enterprise Edition 1.11.2.0. I have found a problem recently where one of our customers purchased 3 different types of products with respective quantities 8,8,6.
In which only shipping was charged and products prices become zero. The actual product price was $8.99.
I have checked no promotion rule was applied on this order.
when I saw the order from admin side only products sku's were visible and name's of products were not displaying and product prices were zero.
Customer used paypal express checkout for payment and his payer status is unverified. Rest of orders being placed near this order are perfect.
Can any one tell me what had gone wrong in this order?

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 get all available shipping methods programmatically in magento?

I'm using magento C.E 1.7. I use all shipping methods of magento and I'm viewing only one shipping method in the front end, which has higher priority. I'm using table rate shipping for some countries.
I wanted to add special fixed shipping price for some products when they shipped to that countries only. So that, I added new shipping method namely 'flat rate per product', by using a new module.
Based on this module, a text box is added to all the products in admin to specify the special shipping price. If I filled this field with some value, It considers it as a special shipping price. And if not filled it, it will be considered as special shipping price is $0.
So I have given least priority in the sort order for this shipping method to avoid this method from viewing on front end when products without special shipping price and products with special shipping price both are added into the cart.
So that, If only the special shipping priced product is added to the cart, It shows only table rate shipping method in front end.
I checked the code in availble.phtml. There is a foreach loop to proceed with available shipping methods. I need to check the availability of the 'flat rate per product' and it's price value for the product before start of loop execution.
I tried to get all the values of the array. But I could not. Can anyone help on this?
you can use this code:
<?php
$methods = Mage::getSingleton('shipping/config')->getActiveCarriers();
$shipMethods = array();
foreach ($methods as $shippigCode=>$shippingModel)
{
$shippingTitle = Mage::getStoreConfig('carriers/'.$shippigCode.'/title');
$shipMethods[$shippigCode] = $shippingTitle;
}
return $shipMethods;
?>

Programmatically add product to Virtuemart?

For a customer I am building a Virtuemart 2.0.26d website.
Because of a local law, for each unit of a product that is ordered a fee must be added.
So, when ordering 4 products, the fee must be charged 4 times. By law it is required that the total sum of this fee is visible on the invoice/order confirmation.
I looked at the price rules in Virtuemart, but they don't seem to have an option for this. There is a price modifier after tax, but then the fee is visibile as an negative discount. Something I don't want.
The only solution I came up with is to make a new product for the fee and programmatically add this product for each unit. Can this be done by making a Virtuemart Plugin, or must I change the core for this?
Or are there better solutions for this problem?
You can add extra charge by Taxes & Calculation Rules.
create new rules and select tax per product for Type of Arithmetic Operation and select Math Operation + Or +% as per you want to add extra fee per product.
You could add a custom field to each product with the fee amount and alter the code of the payment plugin to add this fee to your order.

Categories