2

I am using Joomla 1.5 and Virtuemart 1. With the order confirmation e-mail sent to the seller, is it possible to not show attributes that have the default option selected? (not changed)

For example an attribute would be "Extra Toppings" and values would be "-, peppers, extra cheese, pepperoni..." etc.

If the default value, in the example shown above - "-" - is selected, can I stop the attribute from appearing on the confirmation e-mail?

EDIT: Check attached picture for example of attributes.enter image description here

  • can you please share screenshots. I recently customize the confirmation email in my joomla stuff. I'm using J-1.5 and VM-1.1.9.. maybe I can help you. – MFarooqi Feb 14 '15 at 15:34
  • Did you use a plugin? Really all I need is the attributes to not be shown if it is set to the default value, but show others that have been set to different values. Example of default - Extra Toppings:none Example of chosen value - Extra Toppings: Peppers – Jim Leeder Feb 16 '15 at 9:40
  • Do the buyer select "-" or "pepers, extra cheese etc" or you add these stuff in your products?. And can you please take a screenshot where you/user put the values and what you need. – MFarooqi Feb 17 '15 at 12:57
  • I've put a screenshot in the image. As you can see in this example the default in the last drop down box (attribute) is "Deep Pan". In the other boxes the default option is "No", with the other options being "yes". I want to be able to stop the attributes being shown on the email if the attribute is not changed from the default, since the email is printed out. – Jim Leeder Feb 19 '15 at 14:16
2

My colleague and I worked this out. You edit the ps_product file in administrator - components - com_virtuemart - classes. You do a string replace for the attributes you want affected at the end of the "getDescriptionWithTax" function.

For example, if you want "Remove Topping" to not be shown when its selected at its default value - "none" in this case - then you replace the string "Remove Topping: none" with "" using PHP.

This is useful if you print out the e-mail and need it to be cleaner, and only show the attributes if they have a default value set other than the default value.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.