Any questions about Documents Sellers, post it here .

mod_dms_documents add price?

  • mzekukule
  • Topic Author
  • Offline
  • New Member
  • New Member
More
12 years 8 months ago #14562 by mzekukule
mod_dms_documents add price? was created by mzekukule
hello
how to add a price to my documents in mod_dms_documents?
I add:

<?php
if ($item->price > 0) {
echo number_format($doc->price , 2).(€);
} else {
echo JText::_('DMS_FREE');
}
?>

but it seems that the price is always free :S

you can see from: french-hiphop-music-store.com

thank you

Please Log in or Create an account to join the conversation.

  • mzekukule
  • Topic Author
  • Offline
  • New Member
  • New Member
More
12 years 8 months ago #14576 by mzekukule
Replied by mzekukule on topic Re: mod_dms_documents add price?
hello
how to add a price to my documents in /modules/mod_dms_documents/tmpl?
I add:

<?php
if ($item->price > 0) {
echo number_format($doc->price , 2).(€);
} else {
echo JText::_('DMS_FREE');
}
?>

in default.php
but it seems that the price is always free

you can see from: french-hiphop-music-store.com

thank you

Please Log in or Create an account to join the conversation.

More
12 years 8 months ago #14616 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: mod_dms_documents add price?
The code you wrote in the file default.php in moduleds/mod_dms_documents/tmpl/default.php is correct. However, you need to modify one more file modules/mod_dms_documents/helper.php to get price of document from database.

In this case :

1. Keep the modification you made before .

2. Get the file below, unzip it and upload to modules/mod_dms_documents folder.

After that it should work as expected .

Regards,

Tuan

Attachment helper-20120323.zip not found

Attachments:

Please Log in or Create an account to join the conversation.

  • mzekukule
  • Topic Author
  • Offline
  • New Member
  • New Member
More
12 years 7 months ago #15542 by mzekukule
Replied by mzekukule on topic Re: mod_dms_documents add price?
thank you...

Please Log in or Create an account to join the conversation.