- Posts: 175
- Thank you received: 0
Product's Rank on the product list
12 years 6 months ago - 12 years 6 months ago #148042
by veeco
Product's Rank on the product list was created by veeco
Last edit: 12 years 6 months ago by veeco.
Please Log in or Create an account to join the conversation.
Less
More
- Posts: 12953
- Thank you received: 1778
12 years 6 months ago #148067
by Mohamed Thelji
Replied by Mohamed Thelji on topic Product's Rank on the product list
Hi,
A solution can be to :
1. Add Badges to your products.
Or
2. Create and use product custom field through "Hikashop->Display->Custom fields" named "Rank"
Or
3.. Directly edit the code of the file of the product view through "Hikashop->Display->Views", but some development skills will be required.
Hope this will help you a little.
A solution can be to :
1. Add Badges to your products.
Or
2. Create and use product custom field through "Hikashop->Display->Custom fields" named "Rank"
Or
3.. Directly edit the code of the file of the product view through "Hikashop->Display->Views", but some development skills will be required.
Hope this will help you a little.
Please Log in or Create an account to join the conversation.
12 years 6 months ago - 12 years 6 months ago #148203
by veeco
Replied by veeco on topic Product's Rank on the product list
hello, thanks for your reply
the first and second solution isn't viable since the rank depends on the product's rating and comment and must be dynamically generated
i don't mind coding but could you guide me through it?
i've only figured where the product list is generated
[line 195-ish]
and then a few line after that
[line 217-ish]
the $html contains generated data of the products [after reading it's template]
in the view->product->listing.php
but that's it..
i need to figure where the loop for each product is generated
could you please tell me where the loop for each product is?
the first and second solution isn't viable since the rank depends on the product's rating and comment and must be dynamically generated
i don't mind coding but could you guide me through it?
i've only figured where the product list is generated
[line 195-ish]
Code:
if($filter_type !== 3) {
$this->setLayout('listing');
-->$html = $this->loadTemplate($layout_type);<--
and then a few line after that
[line 217-ish]
Code:
}
-->echo $html;<--
?>
</div>
the $html contains generated data of the products [after reading it's template]
in the view->product->listing.php
but that's it..
i need to figure where the loop for each product is generated
could you please tell me where the loop for each product is?
Last edit: 12 years 6 months ago by veeco.
Please Log in or Create an account to join the conversation.
Less
More
- Posts: 12953
- Thank you received: 1778
12 years 6 months ago #148236
by Mohamed Thelji
Replied by Mohamed Thelji on topic Product's Rank on the product list
Hi,
If you have set the "type of layout" option of your product listing content menu to "DIV", you'll have to edit the "listing_div" file of the "product" view of your front-end template, through the page "Hikashop->Display->Views" :
i need to figure where the loop for each product is generated
could you please tell me where the loop for each product is?
If you have set the "type of layout" option of your product listing content menu to "DIV", you'll have to edit the "listing_div" file of the "product" view of your front-end template, through the page "Hikashop->Display->Views" :
Code:
foreach($this->rows as $row){
The following user(s) said Thank You: veeco
Please Log in or Create an account to join the conversation.
12 years 4 months ago #154845
by veeco
Replied by veeco on topic Product's Rank on the product list
Hello, sorry to bump this thread but i've found new problem
the rank system can't work with the pagination system as hikashop will take the item based on it's limit
for example, if you choose the category parent, it will show it's child and their rank, the problem is that if you limit it by 10, it will only take the first 10 item and ignoring their category, this will affect the rank system
page 1
page 2
as you can see, the categories are different so i can't use the pagination as my base for product's rank
any suggestion?
the rank system can't work with the pagination system as hikashop will take the item based on it's limit
for example, if you choose the category parent, it will show it's child and their rank, the problem is that if you limit it by 10, it will only take the first 10 item and ignoring their category, this will affect the rank system
page 1
page 2
as you can see, the categories are different so i can't use the pagination as my base for product's rank
any suggestion?
Please Log in or Create an account to join the conversation.
Less
More
- Posts: 12953
- Thank you received: 1778
12 years 4 months ago #154886
by Mohamed Thelji
Replied by Mohamed Thelji on topic Product's Rank on the product list
Hello,
Firstly, can you show me how did you proceed to add our ranks through your product listing ?
Firstly, can you show me how did you proceed to add our ranks through your product listing ?
Please Log in or Create an account to join the conversation.
12 years 4 months ago #154949
by veeco
Replied by veeco on topic Product's Rank on the product list
hi
basically, i set the sorting from content module to sort the list based on the average product score
then i create a variable that will adds every time the product displayed
this method's problem occurred if you display based on category parent [where it show all it's children items]
the only solution i know is to display all items in one page but it will make the page loads much more slower
any suggestion
basically, i set the sorting from content module to sort the list based on the average product score
then i create a variable that will adds every time the product displayed
this method's problem occurred if you display based on category parent [where it show all it's children items]
the only solution i know is to display all items in one page but it will make the page loads much more slower
any suggestion
Please Log in or Create an account to join the conversation.
12 years 4 months ago #155094
by nicolas
Replied by nicolas on topic Product's Rank on the product list
Hi,
Maybe creating a HikaShop plugin implementing the onBeforeProductListingLoad trigger and changing the query which loads the elements of the page and do the sorting directly in MySQL would help ?
www.hikashop.com/support/support/documen...reProductListingLoad
Maybe creating a HikaShop plugin implementing the onBeforeProductListingLoad trigger and changing the query which loads the elements of the page and do the sorting directly in MySQL would help ?
www.hikashop.com/support/support/documen...reProductListingLoad
Please Log in or Create an account to join the conversation.
Time to create page: 0.287 seconds