- Posts: 14
- Thank you received: 0
Вывод количества покупок товара
2 years 11 months ago #356020
by DenisM
Вывод количества покупок товара was created by DenisM
Здравствуйте!
Ищу плагин, который выводит количество покупок данного товара в карточке товара. В стандартных инструментах такого не нашел. Может быть кто-то встречал в сторонних плагинах?
Спасибо!
Ищу плагин, который выводит количество покупок данного товара в карточке товара. В стандартных инструментах такого не нашел. Может быть кто-то встречал в сторонних плагинах?
Спасибо!
Please Log in or Create an account to join the conversation.
2 years 11 months ago #356025
by nicolas
Replied by nicolas on topic Вывод количества покупок товара
Hi,
If I understand correctly, you want to display the number of sales on the product details page on the frontend, is that correct ?
You can do so by editing the file product / show_default.php (which is the layout for the product details page on the frontend) via the menu Display>Views and add such code there:
If I understand correctly, you want to display the number of sales on the product details page on the frontend, is that correct ?
You can do so by editing the file product / show_default.php (which is the layout for the product details page on the frontend) via the menu Display>Views and add such code there:
Code:
<?php echo $this->element->product_sales; ?>
The following user(s) said Thank You: DenisM
Please Log in or Create an account to join the conversation.
2 years 11 months ago #356032
by DenisM
Replied by DenisM on topic Вывод количества покупок товара
Да, Вы всё правильно поняли.
Спасибо получилось на Joomla 4.
С сайтом на Joomla 3 пока не получилось.
Если не сложно подскажите, пожалуйста, как дать название этой строчке. (Я пока что не очень понимаю PHP)
Yes, you understood everything correctly.
Thanks, it worked on Joomla 4.
It hasn't worked out yet with a Joomla 3 site.
If it’s not difficult, please tell me how to name this line. (I don't really understand PHP yet)
Спасибо получилось на Joomla 4.
С сайтом на Joomla 3 пока не получилось.
Если не сложно подскажите, пожалуйста, как дать название этой строчке. (Я пока что не очень понимаю PHP)
Yes, you understood everything correctly.
Thanks, it worked on Joomla 4.
It hasn't worked out yet with a Joomla 3 site.
If it’s not difficult, please tell me how to name this line. (I don't really understand PHP yet)
Please Log in or Create an account to join the conversation.
2 years 11 months ago #356033
by nicolas
Replied by nicolas on topic Вывод количества покупок товара
Hi,
The same modification will work on Joomla 3, Joomla 4 and Joomla 5.
If it doesn't work then either:
- you placed the code in a place which is not displayed by HikaShop and thus it's not displayed on the frontend. Moving the code elsewhere in the view file would be the solution.
- you placed the code in an invalid place of the code, which led to an error displayed on the frontend. Moving the code elsewhere in the view file would be the solution.
- you made the view override for a template which you're not using on your frontend. Making the change for the correct template would be the solution.
- you got an error when saving the modification due to a firewall on your website or a security extension / module. The simplest would be to make the override manually via FTP: www.joomlart.com/tutorials/joomla-4-tuto...omponents-and-layout
The same modification will work on Joomla 3, Joomla 4 and Joomla 5.
If it doesn't work then either:
- you placed the code in a place which is not displayed by HikaShop and thus it's not displayed on the frontend. Moving the code elsewhere in the view file would be the solution.
- you placed the code in an invalid place of the code, which led to an error displayed on the frontend. Moving the code elsewhere in the view file would be the solution.
- you made the view override for a template which you're not using on your frontend. Making the change for the correct template would be the solution.
- you got an error when saving the modification due to a firewall on your website or a security extension / module. The simplest would be to make the override manually via FTP: www.joomlart.com/tutorials/joomla-4-tuto...omponents-and-layout
Please Log in or Create an account to join the conversation.
2 years 11 months ago #356057
by DenisM
Replied by DenisM on topic Вывод количества покупок товара
Спасибо за помощь!
Thanks for the help!
Thanks for the help!
Please Log in or Create an account to join the conversation.
Time to create page: 0.200 seconds