News:

Looking for documentation? Take a look on our wiki

Main Menu

BTP Pro Shipping Plugin

Started by PRO, April 02, 2012, 17:06:08 PM

Previous topic - Next topic

hk

Hi PRO,

I installed this plugin. Works great!
I wanted the shipping rate in multiples of quantity. This solved my problem.

The only problem I have is, minimum amount for shipping doesn't work. Attechd is the screenshot of my configuration:
Even though the minimum amount is reached, still it applies the shipping rate based on qty.

[attachment cleanup by admin]

PRO


hk

When I tested this 2 months back, it was working!
Now it does not work.. I tried with various settings, the amount is blank for all scenarios.
Basically I need Shipping cost per quantity.

Can you please assist.


PRO

Quote from: hk on June 13, 2013, 17:14:53 PM
When I tested this 2 months back, it was working!
Now it does not work.. I tried with various settings, the amount is blank for all scenarios.
Basically I need Shipping cost per quantity.

Can you please assist.

post your configuration

hk

Attached are the configuration:



[attachment cleanup by admin]

PRO

the plugin 1st
checks for a weight of 0
IF the order weight is 0 , shipping is free.
THEN: It checks "minimum amount for free shipping". If this is TRUE , then its free shipping.
THEN: It checks the number of products condition, and does what you are wanting it to.

SO: lets assume your products have weights assigned to them. & skip the first 1.
NEXT, it's going to hit the "minimum amount for free shipping" which you have set to 0 (because it's empty)

so, it never hit's the quantity related price



   function getCosts(VirtueMartCart $cart, $method, $cart_prices) {
   $orderWeight = $this->getOrderWeight($cart, $method->weight_unit);
   $nbproducts = $this->_nbproductsCond($cart, $method);
   if ($orderWeight <=0){
   return 0;}
     elseif ($method->free_shipment && $cart_prices['salesPrice'] >= $method->free_shipment) {
       return 0;}
   elseif ($nbproducts >=$method->nbproducts_quantity && $orderWeight >=1 && $method->nbproducts_1fee ==0 ){return $method->nbproducts_fee * $nbproducts;}
      elseif ($nbproducts >=$method->nbproducts_quantity && $orderWeight >=1 && $method->nbproducts_1fee >0 ){
      $nbproducts=$nbproducts-1;
      $temp=$nbproducts *$method->nbproducts_fee;
      return $temp+$method->nbproducts_1fee;
      }
         elseif ($nbproducts >=$method->nbproducts_quantity2 && $orderWeight >=1 && $method->nbproducts_1fee2 ==0 ){return $method->nbproducts_fee2 * $nbproducts;}
      elseif ($nbproducts >=$method->nbproducts_quantity2 && $orderWeight >=1 && $method->nbproducts_1fee2 >0 ){
      $nbproducts=$nbproducts-1;
      $temp=$nbproducts *$method->nbproducts_fee2;
      return $temp+$method->nbproducts_1fee2;
      }

hk

Quote from: PRO on June 14, 2013, 19:32:00 PM
the plugin 1st
checks for a weight of 0
IF the order weight is 0 , shipping is free.
THEN: It checks "minimum amount for free shipping". If this is TRUE , then its free shipping.
THEN: It checks the number of products condition, and does what you are wanting it to.

SO: lets assume your products have weights assigned to them. & skip the first 1.
NEXT, it's going to hit the "minimum amount for free shipping" which you have set to 0 (because it's empty)

so, it never hit's the quantity related price



   function getCosts(VirtueMartCart $cart, $method, $cart_prices) {
   $orderWeight = $this->getOrderWeight($cart, $method->weight_unit);
   $nbproducts = $this->_nbproductsCond($cart, $method);
   if ($orderWeight <=0){
   return 0;}
     elseif ($method->free_shipment && $cart_prices['salesPrice'] >= $method->free_shipment) {
       return 0;}
   elseif ($nbproducts >=$method->nbproducts_quantity && $orderWeight >=1 && $method->nbproducts_1fee ==0 ){return $method->nbproducts_fee * $nbproducts;}
      elseif ($nbproducts >=$method->nbproducts_quantity && $orderWeight >=1 && $method->nbproducts_1fee >0 ){
      $nbproducts=$nbproducts-1;
      $temp=$nbproducts *$method->nbproducts_fee;
      return $temp+$method->nbproducts_1fee;
      }
         elseif ($nbproducts >=$method->nbproducts_quantity2 && $orderWeight >=1 && $method->nbproducts_1fee2 ==0 ){return $method->nbproducts_fee2 * $nbproducts;}
      elseif ($nbproducts >=$method->nbproducts_quantity2 && $orderWeight >=1 && $method->nbproducts_1fee2 >0 ){
      $nbproducts=$nbproducts-1;
      $temp=$nbproducts *$method->nbproducts_fee2;
      return $temp+$method->nbproducts_1fee2;
      }

So what should I change, if I want to have shipping charges based on number of products. All my products have weight=0.

PRO

change this

   if ($orderWeight <=0){
   return 0;}

to this

   if ($orderWeight >=1000){
   return 0;}


& then in your configuration, set the minimum amount for free shipment VERY high

hk

I tried changing the code as you suggested and gave 999999 as  minimum amount for free shipment. It did not work.
I uninstalled this plugin. Downloaded again and installed. Even then it did not work.
It just shows the name of shipment with empty amount.

osonabit

Hi PRO,

I spent lot of hours looking for a shipping method and I think that your plugin is the one that can help me, but with some changes. I explain:

In my case (and not because I want, but because the shipping company use this method) I need to calculate the total cost of the shipping adding the shipping cost of each product weight in the cart, and NO the total weight of the cart.

Ex.

This is the prices I have from Shipping company

Kg             Germany             France
0 - 3            11,12                12,85
3 - 10          12,26                13,84
10 - 15        13,42                14,38
15 - 20        14,38                15,34
20 - 31        16,90                17,47

In the cart we have: (Destination France)

Product                                 UNITS
Product A (2kg)                         2
Product B (6kg)                         1
Product C (16kg)                       1

Manual calculation is:
Product A         2 units     at    12,85€   = 25.70€
Product B         1 unit       at    13,84€   = 13.84€
Product C         1 unit       at    15,34€  =  15,34€

TOTAL Shipping Cost:            55,88€

Do you  think that you plugin can be updated to make that? because I don't need to multiply rate per kg, only take the rate and add it to total shipping cost for each product in the cart.

Another thing to consider is the Italy Islands that i have a extra cost of 15€ over the base rate, and I don't know how control it with the plugin.

I can pay a fee if it's necessary.

I need some solution, because we have all done in the webpage, and we are stuck here.

Thanks in advance.



PRO


osonabit

Hi PRO, there are not any plugin to help me, and your pluguin is very similar that i want. I'm trying to modify your plugin with a bucle to read each product line, get the product weight to choose the correct rate and calculate the cost by "product quantity * rate."

I'm a newbie with php, and i'm sure that the solution it's not difficult. Please, just take a look at this code, to show you want i'm trying to do. I'ts not working know because i think that and don't get que correct variables from the cart of each product. You give me this idea with this code that you wrote in this post, where you use a bucle to add up the products weight, Why can't use it to add up the shippint cost oof each product in the cart?

https://forum.virtuemart.net/index.php?topic=120975.msg414003#msg414003


The code of your plugin i'm trying to update is this:


function getCosts(VirtueMartCart $cart, $method, $cart_prices) {
$orderWeight = $this->getOrderWeight($cart, $method->weight_unit);
$nbproducts = $this->_nbproductsCond($cart, $method);
$tcost= 0;
foreach ( $products as $prow) {

if ($orderWeight <=0){
return 0;}
elseif ($nbproducts >=$method->nbproducts_quantity && $orderWeight >=1 && $method->nbproducts_1fee ==0 ){return $method->nbproducts_fee * $nbproducts;}
elseif ($nbproducts >=$method->nbproducts_quantity && $orderWeight >=1 && $method->nbproducts_1fee >0 ){
$nbproducts=$nbproducts-1;
$temp=$nbproducts *$method->nbproducts_fee;
return $temp+$method->nbproducts_1fee;
}
elseif ($nbproducts >=$method->nbproducts_quantity2 && $orderWeight >=1 && $method->nbproducts_1fee2 ==0 ){return $method->nbproducts_fee2 * $nbproducts;}
elseif ($nbproducts >=$method->nbproducts_quantity2 && $orderWeight >=1 && $method->nbproducts_1fee2 >0 ){
$nbproducts=$nbproducts-1;
$temp=$nbproducts *$method->nbproducts_fee2;
return $temp+$method->nbproducts_1fee2;
}
  elseif ($method->free_shipment && $cart_prices['salesPrice'] >= $method->free_shipment) {
return 0;}
elseif ($prow->product_weight >= $method->weight_min1 && $prow->product_weight <=$method->weight_max1){
$tcost += $prow->quantity * $method->rate1;
}
elseif ($prow->product_weight >= $method->weight_min2 && $prow->product_weight <=$method->weight_max2){
$tcost += $prow->quantity *  $method->rate2;
}
elseif ($prow->product_weight >= $method->weight_min3 && $prow->product_weight <=$method->weight_max3){
$tcost += $prow->quantity *  $method->rate3;
}
elseif ($prow->product_weight >= $method->weight_min4 && $prow->product_weight <=$method->weight_max4){
$tcost += $prow->quantity *  $method->rate4;
}
elseif ($prow->product_weight >= $method->weight_min5 && $prow->product_weight <=$method->weight_max5){
$tcost += $prow->quantity *  $method->rate5;
}
elseif ($prow->product_weight >= $method->weight_min6 && $prow->product_weight <=$method->weight_max6){
$tcost += $prow->quantity *  $method->rate6;
}
else{
return $method->elsecost;
}
}
return $tcost;
    }



I'm really appreciate your help, or the other person.

Thanks.

osep45

I have installed and publish it on :
- Joomla! 2.5.13
- Virtuemart 2.0.22a

I have carefully read : http://www.kaizenmediaworks.com/pro-ship-virtuemart-2-0-shipping-plugin-module
Thank you PRO, for this great plugin !

This plugin uses multiplication of the rate you set and the order weight.
It also has free shipping over certain order total.
But can it set a shipping fee under a certain order total ?

My shipping cost rule is quite simple:
- Orders between 0.75 € and 24.50 €  => shipping cost = 1.55 €.
- Beyond 24.5 €  => shipping cost = 0 €.

Is it possible ?

Osep45

PRO

Quote from: osep45 on July 04, 2014, 16:43:01 PM
I have installed and publish it on :
- Joomla! 2.5.13
- Virtuemart 2.0.22a

I have carefully read : http://www.kaizenmediaworks.com/pro-ship-virtuemart-2-0-shipping-plugin-module
Thank you PRO, for this great plugin !

This plugin uses multiplication of the rate you set and the order weight.
It also has free shipping over certain order total.
But can it set a shipping fee under a certain order total ?

My shipping cost rule is quite simple:
- Orders between 0.75 € and 24.50 €  => shipping cost = 1.55 €.
- Beyond 24.5 €  => shipping cost = 0 €.

Is it possible ?

Osep45



sorry but my plugin is not setup for this.