rating disable

  • Posts: 25
  • Thank you received: 1
9 years 4 months ago #208364

-- HikaShop version -- : 2.4.0
-- Joomla version -- : 3.3.6
-- PHP version -- : 5.4.37

Hi,
I override my orders page (order_listing.php) and search results (default_results.php) page and now I am able to show images and vote datas of the products and orders.
How can I disable rating in these pages and how can I get the custom fields data of a product.

Thank you.

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

  • Posts: 82868
  • Thank you received: 13378
  • MODERATOR
9 years 4 months ago #208371

Hi,

Your message is not clear so it's going to be hard to answer you directly.

You said that you customized these files to display the votes and you're asking how to disable the votes on these pages.
So I suppose that you don't want to just remove the votes that you added with custom code, but modify the way it looks so that you can still see the vote results, but not be able to vote on these pages.
As these are not standard things of HikaShop (the default_results.php file is not even an HikaShop view), we don't know the code that you're using to display the votes and thus cannot say how to do that or even if what we deduced from your message is correct.

So before moving forward and answering you, we first need to understand the situation and what you want to do where.
Could you provide some screenshots of the pages you're talking about and tell us what code you changed where exactly so that we can understand where you're coming from ?

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

  • Posts: 25
  • Thank you received: 1
9 years 4 months ago #208948

Yes, what you understand about rating display is correct, sorry if my question was unclear. I want just to show the rating value but I don't want user to be able to vote in these pages ( "search result" and "my orders" pages). To show rating stars, I used the way of product page (show_tabular.php). You can find the screenshot of search results page is attached.

The second thing I want to learn is how to get data of custum fields of products in order_listing.php. For example, for each product there is a custom field for the autor of the course. I want to get this data in order_listing.php.

I hope my question is clear now :)

Attachments:

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

  • Posts: 13201
  • Thank you received: 2322
9 years 4 months ago #209021

Hi,

So I guess that you are calling the view "mini" of the "vote" layout.
What could be done is just use that kind of code instead:

			for($i = 1; $i <= $row->hikashop_vote_average_score_rounded; $i++) {
				echo '<span class="ui-rating-star ui-rating-full"></span>';
			}
			for($i = $row->hikashop_vote_average_score_rounded; $i < $row->hikashop_vote_nb_star; $i++) {
				echo '<span class="ui-rating-star ui-rating-empty"></span>';
			}

To get the "author" value you should just have to use the following code:
echo $row->CUSTOMFIELD_NAME;
// so in your case potentially:
echo $row->author;

The following user(s) said Thank You: nabukadnezar

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

Time to create page: 0.054 seconds
Powered by Kunena Forum