VirtueMart

WooCommerce

Others

Docs

Support

Demo

Blog

About

Forum
Welcome, Guest
Username: Password: Remember me

TOPIC: [SOLVED] Fix price for each SKU will not duplicate

Fix price for each SKU will not duplicate 08 Jul 2015 15:08 #1

Hello I am testing the following rule:
contains_only(SKUs, "tcell3N","tcell5N"); Shipping=19
however if i add 2 of the same product the shipping cost is still $19, if I add the following 2 products the shipping cost is still $19
192.185.56.87/~saltsolutionsinc/index.ph...sale/t-cell-3-detail
192.185.56.87/~saltsolutionsinc/index.ph.../t-cell-3-124-detail

Can you please guide on how to implement so that every item has its own shipping price and for each additional product added to the cart add $5 more
For example; If I purchase 2 "tcell3N" the shipping price total will $19 for the 1st item and for each additional tcell3N will add + $5
If I purchase 1 tcell3N and 1 tcell5N then the shipping price will be $38 because they are 2 different products costing individually $19

Thank you very much for your help.
The administrator has disabled public write access.

Fix price for each SKU will not duplicate 09 Jul 2015 01:28 #2

Dear Vabril,
First, let me mention that the plugin is not actually designed to product per-product shipping structures. There are, however, ways to achieve what you want. The "easiest" way is to use a custom variable to collect the shipping costs of each product and check each of your products separately. In particular:
Variable=MyCost; Value=0
Variable=MyCost; "tcell3N" in SKUs; Value=MyCost+14+5*evaluate_for_skus(articles, "tcell3N")
Variable=MyCost; "tcell5N" in SKUs; Value=MyCost+14+5*evaluate_for_skus(articles, "tcell5N")
....
Shipping=MyCost
See also open-tools.net/forum/shipping-by-rules-p...figuration.html#6388

As a simplification: Does each product have the same basic shipping cost of 19€ for the first item and the same cost 5$ for each additional item? In that case, there is no need to check each article separately. The shipping cost can then be calculated directly as
- 19$ times the number of products
- PLUS
- 5$ times (the total quantity of the cart MINUS the number of products)
or equivalently
- 14$ times the number of products
- PLUS
- 5$ times the total quantity of the cart

This can be implemented as a single rule:
Shipping=14*Products + 5*Articles

Best regards,
Reinhold
The administrator has disabled public write access.

Fix price for each SKU will not duplicate 09 Jul 2015 02:28 #3

I test the firts code and i got the following:

Unknown function 'evaluate_for_skus' encountered during evaluation of rule 'Variable=MyCost; "tcell5N" in SKUs; Value=MyCost+14+5*evaluate_for_skus(articles, "tcell5N")'.
Evaluation yields unknown value while evaluating rule part '....'.
The administrator has disabled public write access.

Fix price for each SKU will not duplicate 09 Jul 2015 03:34 #4

Ok I entered in the Rules Box the following:
Variable=MyCost; Value=0
Variable=MyCost; "tcell3N" in SKUs; Value=MyCost+14+5*evaluate_for_skus(articles, "tcell3N")
Variable=MyCost; "tcell5N" in SKUs; Value=MyCost+14+5*evaluate_for_skus(articles, "tcell5N")
Shipping=MyCost

I get the following error message:
Unknown function 'evaluate_for_skus' encountered during evaluation of rule 'Variable=MyCost; "tcell3N" in SKUs; Value=MyCost+14+5*evaluate_for_skus(articles, "tcell3N")'.

My sipping information has a shipping price of $14:

VM Shipping By Rules Advanced (Discount/Fee: $14.00)

What I am doing wrong? Please help me i have a dead line on this website and I really need to have this working.

Thanks
The administrator has disabled public write access.

Fix price for each SKU will not duplicate 09 Jul 2015 06:09 #5

vabril wrote:
Ok I entered in the Rules Box the following:
Variable=MyCost; Value=0
Variable=MyCost; "tcell3N" in SKUs; Value=MyCost+14+5*evaluate_for_skus(articles, "tcell3N")
Variable=MyCost; "tcell5N" in SKUs; Value=MyCost+14+5*evaluate_for_skus(articles, "tcell5N")
Shipping=MyCost

I get the following error message:
Unknown function 'evaluate_for_skus' encountered during evaluation of rule 'Variable=MyCost; "tcell3N" in SKUs; Value=MyCost+14+5*evaluate_for_skus(articles, "tcell3N")'.

My sipping information has a shipping price of $14:

VM Shipping By Rules Advanced (Discount/Fee: $14.00)

What I am doing wrong? Please help me i have a dead line on this website and I really need to have this working.

Thanks
just to let you know i was looking into the code and inside the file rules_shipping_base.php there is nothing called evaluate_for_skus
The administrator has disabled public write access.

Fix price for each SKU will not duplicate 09 Jul 2015 11:11 #6

Dear Vabril,
Yes, thank you for looking into the code. We indeed have completely messed up the evaluate_for_skus function... We have the fixes in a development version, which is not ready for release yet, unfortunately.
The function currently is called evaluate_for_products, but the filter for products is also broken and that function does not properly work, either...
I don't have any ETA for the next release, which contains the fixes, but we will try to get it out in the next two to three weeks.

Sorry,
Reinhold
The administrator has disabled public write access.

Fix price for each SKU will not duplicate 10 Jul 2015 23:21 #7

Please let me know as soon it is available.

Thanks
The administrator has disabled public write access.

Fix price for each SKU will not duplicate 13 Jul 2015 23:57 #8

Please try the latest version 5.5, which I just released.

Best regards,
Reinhold
The administrator has disabled public write access.

Fix price for each SKU will not duplicate 23 Oct 2015 19:48 #9

I see that you have a plg_opentools_vm_rules_shipping_advanced_v5.6 release;
can you please tell me how to calculate shipping cost per product or a lease per category, I am about to loose my customer :(
The administrator has disabled public write access.

Fix price for each SKU will not duplicate 25 Oct 2015 20:22 #10

Dear Vabril,
Have you tested the rules I gave on July 9 with the latest version? Does it still not work? That version should have the evaluate_for_sku function fixed.
You should not get any errors any more. If you do still get error, can you please post the exact error messages here?

Best regards,
Reinhold
The administrator has disabled public write access.

Fix price for each SKU will not duplicate 27 Oct 2015 05:11 #11

Thank you very much I did tested and now it works just how i wanted.
So basically the evaluations with the SKU's is great, my site have about 24 products with different shipping prices so it is manageable to work doing the bellow recommendations.

Variable=MyCost; Value=0
Variable=MyCost; "700161441338" in SKUs; Value=MyCost+14+5*evaluate_for_skus(articles, "700161441338")
Variable=MyCost; "700161441345" in SKUs; Value=MyCost+13+5*evaluate_for_skus(articles, "700161441345")
Variable=MyCost; "700161441352" in SKUs; Value=MyCost+10+5*evaluate_for_skus(articles, "700161441352")
Variable=MyCost; "700161441369" in SKUs; Value=MyCost+10+5*evaluate_for_skus(articles, "700161441369")
Variable=MyCost; "700161441376" in SKUs; Value=MyCost+10+5*evaluate_for_skus(articles, "700161441376")
Shipping=MyCost
The administrator has disabled public write access.

[SOLVED] Fix price for each SKU will not duplicate 27 Oct 2015 05:11 #12

Problem solved.
The administrator has disabled public write access.

VM - Shopping cart

 x 

Cart empty

Login Formular