Login
Register

VirtueMart

WooCommerce

Others

Docs

Support

Blog

About

Forum

IMPORTANT ANNOUNCEMENT: Plugin development ceased, all plugins made available freely (GPL)

With great sadness we have to announce that we are ceasing development of all our VirtueMart, WooCommerce and Joomla plugins. Effective immediately, all our plugins -- even those that were paid downloads -- are made available for free from our homepage (GPL license still applies), but we cannot and will not provide any support anymore.

It has been a great pleasure to be part of the thriving development communities of VirtueMart as well as WooCommerce. However, during the last year it became painstakingly clear that in addition to a full-time job, a young family and several other time-consuming hobbies at professional level (like being a professional singer) the plugin development and the support that it requires is not sustainable and is taking its toll. It has been an honor, but it is now time to say good bye!

×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

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

  • vabril
  • vabril's Avatar Topic Author
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.

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

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

  • vabril
  • vabril's Avatar Topic Author
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 '....'.

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

  • vabril
  • vabril's Avatar Topic Author
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

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

  • vabril
  • vabril's Avatar Topic Author

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

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

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

  • vabril
  • vabril's Avatar Topic Author
Please let me know as soon it is available.

Thanks

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

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

  • vabril
  • vabril's Avatar Topic Author
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 :(

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

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

  • vabril
  • vabril's Avatar Topic Author
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

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

  • vabril
  • vabril's Avatar Topic Author
Problem solved.
  • Page:
  • 1