VirtueMart

WooCommerce

Others

Docs

Support

Demo

Blog

About

Shipping by Rules for VirtueMart

We are currently unable to provide proper support!

For the last few months we have been very busy working on some huge, very time-consuming and time-sensitive projects, so our support was very limited and we were unable to provide proper support in our forums! We now have a huge backlog of requests from our customers, which we are trying to clear bit by bit. Unfortunately, this takes longer than we anticipated, so our response time is not yet up to par. We are trying our best to improve this situation as soon as possible.

Sorry for the inconvenience and thank you for your understanding!

Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: [SOLVED] Evaluate For Categories

Evaluate For Categories 24 Mar 2018 18:32 #1

  • fer3oon
  • fer3oon's Avatar Topic Author
  • Offline
  • Posts: 12
HI all ,

i have a scenario for my shipping items, and i did not find a way to calclate these scenarios.
letus assume that i have Categories slug name "clothes", "shoes","accessories", and "refrigerator" , "furniture","cooker"
scenario 1
user buys from category names "clothes or shoes or accessories , in that scenario i need to charge him only "shipping =20 + (15*length(Vendors))
scenario 2
user buys from category names "Refrigerator or Furniture" , in that scenario i need to charge him only "Shipping=400 + (100*length(Vendors))

scenario 3

user buys from categories "Clothes and Refrigerator and any other categories" at the same cart, here i need to charge him "shipping =(20 + (15*length(Vendors)) )+ 500


this what i am doing but unfortunately i get nothing


Name=Shipping; Shipping=20+(15*length(Vendors))

Name=Home Supplies;Condition=contains_any(Categories,"air-conditioners", "deep-freezer", "emergency-lights", "gas-cookers", "kitchen-appliances", "refrigerators", "washing-machines","water-dispensers","water-heaters","bed-room","kids-room","kitchen");articles<=1; ;Shipping=400+(100*length(Vendors))

any idea ?

Please Log in or Create an account to join the conversation.

Evaluate For Categories 24 Mar 2018 20:26 #2

  • fer3oon
  • fer3oon's Avatar Topic Author
  • Offline
  • Posts: 12
Now i have a solution for this, i have used this function

Name="Home Supplies"; Condition=contains_any(Categories, "refrigerators","bed-room");Shipping=500*(articles)
Name="Shipping"; Condition=contains_none(Categories, "refrigerators");Shipping=20+(15*length(Vendors))

my issue is on articles " i need length (articles) when they in any of the Categories("refrigerators","bed-room") only not all articles on the cart

Please Log in or Create an account to join the conversation.

Evaluate For Categories 24 Mar 2018 20:59 #3

  • fer3oon
  • fer3oon's Avatar Topic Author
  • Offline
  • Posts: 12
Name="Home Supplies"; (Condition=contains_any(Categories, "refrigerators","bed-room") );Shipping=(500 * (evaluate_for_categories(length(Vendors), "refrigerators","bed-room")))+ ((evaluate_for_categories(articles, "refrigerators","bed-room")) *50)
solved :)

Please Log in or Create an account to join the conversation.

[SOLVED] Evaluate For Categories 24 Mar 2018 20:59 #4

  • fer3oon
  • fer3oon's Avatar Topic Author
  • Offline
  • Posts: 12
Problem solved.

Please Log in or Create an account to join the conversation.

  • Page:
  • 1