Author Topic: Display child price range for parent product?  (Read 14740 times)

K2VD4X

  • Beginner
  • *
  • Posts: 5
  • Skype Name: tilly042
Re: Display child price range for parent product?
« Reply #15 on: December 19, 2014, 00:57:11 am »
I found a solution, though I will state right now that this comes about 4 years after the initial poster put this topic on the forum and I am using a different version of Virtuemart.

The price range can be implemented just using CSS. Find the ID tag for the Product Price in the cart section. This is numbered as unique for each product. With this I used the ::after CSS selecter to insert the text and style it according to the W3Schools reference:
http://www.w3schools.com/cssref/sel_after.asp

example
Code: [Select]
#productPrice7 div.PricesalesPrice::after {
  content: "  to  $ 180.00";
}

Other products will have other numbers in the ID tags, meaning they won't be affected by this CSS styling command.

I think this is a valid hack for a one-off simple 'hack'.

oviliz

  • Beginner
  • *
  • Posts: 27
Re: Display child price range for parent product?
« Reply #16 on: December 19, 2014, 09:38:47 am »
Thanks man for your trick. Actually could be very useful in absence of so simple function.

Unfortunately I'm migrating now to Magento and I'm not sure if I'll still have the time to use the trick on my actual VM website.
I'm sad because I was really curious to see VM3 on my website. I don't know anyway if there would be such a function.

roojai

  • Beginner
  • *
  • Posts: 12
Re: Display child price range for parent product?
« Reply #17 on: April 20, 2015, 06:31:42 am »
Great tip - thanks:

I found a solution, though I will state right now that this comes about 4 years after the initial poster put this topic on the forum and I am using a different version of Virtuemart.

The price range can be implemented just using CSS. Find the ID tag for the Product Price in the cart section. This is numbered as unique for each product. With this I used the ::after CSS selecter to insert the text and style it according to the W3Schools reference:
http://www.w3schools.com/cssref/sel_after.asp

example
Code: [Select]
#productPrice7 div.PricesalesPrice::after {
  content: "  to  $ 180.00";
}

Other products will have other numbers in the ID tags, meaning they won't be affected by this CSS styling command.

I think this is a valid hack for a one-off simple 'hack'.