Author Topic: Multiple Quantity Price Table Display  (Read 6487 times)

ojhernandez

  • Guest
Multiple Quantity Price Table Display
« on: November 21, 2009, 20:19:42 pm »
Hello,

I know that I can set different prices depending on the quantity however one thing still puzzles me.

Is there a way to do a "x+" type of pricing. x being the price.

Right now the last tier of pricing for my product is:

11 - 999999 $61.90

I would like to know how to do this without having "999999" in there.

How do I do this?

Thanks,

ojhernandez

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10420
  • VirtueMart Version: 3+
Re: Multiple Quantity Price Table Display
« Reply #1 on: November 21, 2009, 21:04:34 pm »
Maybe you can do it in the database.

See picture attached. NOW I AM NOT AN SQL GUY, BUT JUST A GUESS.



[attachment cleanup by admin]
J3.9+ VM 3.4.2
Slowest Page Speed Score (88) (Category)
Fastest Page Speed Score (94-96) (productdetails)

ojhernandez

  • Guest
Re: Multiple Quantity Price Table Display
« Reply #2 on: November 22, 2009, 06:11:00 am »
I have no such table with that name.

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10420
  • VirtueMart Version: 3+
Re: Multiple Quantity Price Table Display
« Reply #3 on: November 22, 2009, 13:14:37 pm »
vm_price

J3.9+ VM 3.4.2
Slowest Page Speed Score (88) (Category)
Fastest Page Speed Score (94-96) (productdetails)

ojhernandez

  • Guest
Re: Multiple Quantity Price Table Display
« Reply #4 on: November 22, 2009, 14:29:59 pm »
I tried this and it didn't work. It just made the new pricing structure:

11-0.

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10420
  • VirtueMart Version: 3+
Re: Multiple Quantity Price Table Display
« Reply #5 on: November 22, 2009, 14:31:19 pm »
what did you put?

J3.9+ VM 3.4.2
Slowest Page Speed Score (88) (Category)
Fastest Page Speed Score (94-96) (productdetails)

rb

  • Advanced
  • Full Member
  • *****
  • Posts: 1503
Re: Multiple Quantity Price Table Display
« Reply #6 on: November 23, 2009, 01:44:11 am »
This may be a solution.  I tested it a little and it worked for me, but you should test it some more to see if it works in your situation.  Make a copy of, then edit this file:

components/com_virtuemart/themes/default/templates/common/price.tpl.php

Then, just prior to the line:

Code: [Select]
echo $price_table;
insert the following lines so it looks like this:

Code: [Select]
// Change the last row of the quantity pricing from, for example, "10 - 99" to "10+"
$price_table = strrev($price_table);
$price_table = preg_replace( "|>dt<>dt/<\d* - (\d*>dt<.*)|", '>dt<>dt/<+$1', $price_table );
$price_table = strrev($price_table);
//
echo $price_table;

Be sure to put that change to the database table jos_vm_table that you made above back to its original value. Let me know if this template change solves your issue.

ojhernandez

  • Guest
Re: Multiple Quantity Price Table Display
« Reply #7 on: May 08, 2010, 17:37:51 pm »
This may be a solution.  I tested it a little and it worked for me, but you should test it some more to see if it works in your situation.  Make a copy of, then edit this file:

components/com_virtuemart/themes/default/templates/common/price.tpl.php

Then, just prior to the line:

Code: [Select]
echo $price_table;
insert the following lines so it looks like this:

Code: [Select]
// Change the last row of the quantity pricing from, for example, "10 - 99" to "10+"
$price_table = strrev($price_table);
$price_table = preg_replace( "|>dt<>dt/<\d* - (\d*>dt<.*)|", '>dt<>dt/<+$1', $price_table );
$price_table = strrev($price_table);
//
echo $price_table;

Be sure to put that change to the database table jos_vm_table that you made above back to its original value. Let me know if this template change solves your issue.


rb,

I am sorry that it has taken me so long to reply to your post. This is because I have been very busy and have not had the time to implement you solution.

After doing what you said to do, everything appears to work as expected.

Thank you so much. I greatly appreciate what you have told me.

With Great Thanks,

Ojhernandez