Login
Register

VirtueMart

WooCommerce

Others

Docs

Support

Blog

About

Shipping by Rules for VirtueMart

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:

Comments to admin only 20 Feb 2018 13:55 #1

  • sucolega
  • sucolega's Avatar Topic Author
Hi, I use the advance shipping by rules, J3.8.5 and VM 3.2.12.
I need to put some data in the order email only to admin (vendor). I have two couriers for shipping, one from 0 to 10kg and the other from 10 to 999 Kg. I dont want to show to the user my courier but I need to know which one has been used. Can I use some hidden field and print in the vendor mail?

Another question, If the shipment is free from 100€, how can I know how much the shipment would have cost? Could it be printed somewhere?
And better yet, could it be hidden and displayed only in the vendor email?

Thanks!

Comments to admin only 24 Feb 2018 22:55 #2

Dear Sucolega,
By default, VirtueMart simply inserts the shipping method name and description of the selected shipping method into both the mail sent to the vendor and the customer, aswell as into the invoice PDF.

The only way I see is to make a template override for the order confirmation mail, insert some customized HTML code into the rule name and then in the template (override) filter out that customized HTML for the customer email, while the vendor mail would still contain it.
E.g.
Variable=FreeShippingCost; Value=123
Name='Free Shipping<div id="free-shipping-cost">{FreeShippingCost}</div>'; Amount>100; Shipping=0
Name='Shipping method<div id="courier">courier A</div>'; Weight<10; Shipping=123
Name='Shipping method<div id="courier">courier B</div>'; Weight>=10; Shipping=123
In your template's order email PHP template file you would then add a check whether the customer or vendor mail is currently created and depending on that remove the <div...>...</div> from the shipipng method name.

However, this has nothing to do with our plugin, it's all about tweaking the VirtueMart internals.

Best regards,
Reinhold
  • Page:
  • 1