• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: i need order random id with static prefix in field

i need order random id with static prefix in field 12 years 1 month ago #22303

  • arsalan
  • arsalan's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
hello

i am using RS form pro rev 46 kindly tell me i amd making an order form without ay payment
cusotmer fill the forms and order thing..now i have provided hidden field with order id to track customer order ...i applied code i.e

//<code>
return "QR2013-".str_pad(intval(@mysql_result(mysql_query("SELECT COUNT(`SubmissionId`) cnt FROM ".$RSadapter->tbl_rsform_submissions." WHERE FormId=3"),0)),3,"0",STR_PAD_LEFT);
//</code>

it works generate number but order id always come with same out put number i.e QR2013-000
i need it to increase sequentially kindly help.... after that i searched and found code

//<code>
$db=JFactory::getDBO();
$db->setQuery("SELECT COUNT(`SubmissionId`) cnt FROM #__rsform_submissions WHERE FormId=1");
$db->query();
$result=$db->loadResult();
return intval($result)+1;
//</code>

and applied but i get +1 in code no pre static code as i need the output

kindly help me and give me code that can generate random id in hidden field on form submission other then already generated id with constant prefix

i hope half solution is in it half ...kindly provide full code for help as i copy past e it
regards
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!