IPrice minimart
powerfull & flexible online Store, price-lists and catalogs for Joomla
Welcome, Guest
Username: Password: Remember me

TOPIC: how to set order multiple

how to set order multiple 10 years 7 months ago #794

  • vmurphy
  • vmurphy's Avatar
  • Offline
  • Новый участник
  • Posts: 18
  • Karma: 0
Thanks for the 14 day trial, works great. I'm working through things to determine if it fits my requirements. All seems good so far except for 1 item. I have need to control the order quantity multiple. My order items must always be ordered in multiples of 10 (maybe other multiple in different categories also). I see no control for this and I'm wondering what my options might be.
Login or register to post message.

how to set order multiple 10 years 5 months ago #880

  • Elie
  • Elie's Avatar
  • Offline
  • Новый участник
  • Posts: 10
  • Thank you received: 1
  • Karma: 0
Did you get an answer to this?
Login or register to post message.

how to set order multiple 10 years 5 months ago #881

  • vmurphy
  • vmurphy's Avatar
  • Offline
  • Новый участник
  • Posts: 18
  • Karma: 0
No but managed to customize some code to provide the required functions.
Change was made to
administrator/components/com_ipricecalc/helpers/html.php
around line 553
changed:
"var qty_el = document.getElementById('i_$i'); var qty = qty_el.value; if( !isNaN( qty )) qty_el.value++; else qty_el.value=1; check_event(qty_el); return false;",
"var qty_el = document.getElementById('i_$i'); var qty = qty_el.value; if( !isNaN( qty ) && qty>0) qty_el.value--; else qty_el.value=0; check_event(qty_el); return false;"

to

/* vjm */
$mult = 10;
if (substr($item->section,0,4) == "Gift") {$mult = 25;}

echo JHTMLIpriceList::upperDownArrows(
/* vjm ***
"var qty_el = document.getElementById('i_$i'); var qty = qty_el.value; if( !isNaN( qty )) qty_el.value++; else qty_el.value=1; check_event(qty_el); return false;",
"var qty_el = document.getElementById('i_$i'); var qty = qty_el.value; if( !isNaN( qty ) && qty>0) qty_el.value--; else qty_el.value=0; check_event(qty_el); return false;"
*/
"var qty_el = document.getElementById('i_$i'); var qty = qty_el.value; if( !isNaN( qty )) qty_el.value = +qty + $mult; else qty_el.value=$mult; check_event(qty_el); return false;",
"var qty_el = document.getElementById('i_$i'); var qty = qty_el.value; if( !isNaN( qty ) && qty>0) qty_el.value = +qty - $mult; else qty_el.value=0; check_event(qty_el); return false;"

I have need to 2 different multiples depending on the section/item being used.

hope this helps.
Login or register to post message.
Moderators: support

Subscribe



Subscribe to our newsletter and social networks to be updated with the latest updates.

Login