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!

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

VM - Shopping cart

 x 

Cart empty

Login Formular