VirtueMart Forum

VirtueMart 2 + 3 + 4 => Product pricing => Topic started by: bratamic on November 07, 2020, 13:20:18 PM

Title: SOLVED: Add "delivery fee will be calculated on checkout" to description page.
Post by: bratamic on November 07, 2020, 13:20:18 PM
I would like to add a simple comment to all products that states that the delivery fee will be calculated at checkout without having to place this comment in every single description of every product. I was hoping that there would be some sort of area in VM config that would allow for a generic comment but I cant seem to find it and nor do I know of an easy way of doing it other than hard coding it. Problem is I don't know where and how. Does any body have any solutions for me or are able to point me to a thread that has solved this issue before?

Joomla 3.9.22
VM  3.6.10
Title: Re: Add "delivery fee will be calculated on checkout" to description page.
Post by: Jörgen on November 07, 2020, 16:45:34 PM
Make a hidden parent product with a custom field that contains the text.
Ad as many children as you like they inherit the fields from the parent, if not overridden by the child.

Jörgen
Title: Re: Add "delivery fee will be calculated on checkout" to description page.
Post by: GJC Web Design on November 07, 2020, 16:52:17 PM
add a custom field - type string

position  - probably normal   - see screen shot

the drawback is u need to add this custom field to each product.

Personally I would simply add it in a logical position in the templates\xxx\html\com_virtuemart\productdetails\default.php  over ride

perhaps after   <?php echo $this->product->product_desc; ?>

<?php echo '<br />delivery fee will be calculated at checkout'; ?>



Title: Re: Add "delivery fee will be calculated on checkout" to description page.
Post by: Jörgen on November 07, 2020, 17:41:15 PM
You have basically three options


Jörgen
Title: Re: Add "delivery fee will be calculated on checkout" to description page.
Post by: bratamic on November 07, 2020, 17:56:21 PM
Thank you GJC for your advice its exactly the thing I was thinking would work but I don't know how to code. I don't suppose you know where the position would be to place that code just above the pricing instead?
I just also want to also thank both you guys that have replied, You guys don't know it but you have helped me out countless times in other threads along with Jenkin and Max and for this I'm truly grateful !!! ;D
Title: Re: Add "delivery fee will be calculated on checkout" to description page.
Post by: GJC Web Design on November 07, 2020, 18:14:19 PM
in a std template would be before

echo shopFunctionsF::renderVmSubLayout('prices',array('product'=>$this->product,'currency'=>$this->currency));
Title: SOLVED Add "delivery fee will be calculated on checkout" to description page.
Post by: bratamic on November 07, 2020, 18:24:30 PM
This solution worked for me. Thank you very very much for all your help, This time and all the other times you were not even aware about. ;D ;D ;D ;)