Author Topic: Change "Orderby menu" to list of items  (Read 3070 times)

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 9374
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: Change "Orderby menu" to list of items
« Reply #15 on: November 11, 2019, 22:48:49 pm »
the info is there but in an awful format..

Code: [Select]
<div class="orderlist collapse">
<div><a title="Product Name" href="/shop/by,product_name?keyword=" class="btn btn-xs btn-default btn-block">Product Name</a></div>
<div><a title="Product SKU" href="/shop/by,product_sku?keyword=" class="btn btn-xs btn-default btn-block">Product SKU</a></div>
<div><a title="Category" href="/shop/by,category_name?keyword=" class="btn btn-xs btn-default btn-block">Category</a></div>
<div><a title="Manufacturer name" href="/shop/by,mf_name?keyword=" class="btn btn-xs btn-default btn-block">Manufacturer name</a></div>
<div><a title="Ordering" href="/shop/by,ordering?keyword=" class="btn btn-xs btn-default btn-block">Ordering</a></div>
</div>

you need to parse the html to get the titles and links, then construct a select from it.. with some JS to document.location.replace(this.value); on change
this can be done with a function called from the cat template

but maybe it would be better to ask the devs to return this in a nicer format
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4168
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: Change "Orderby menu" to list of items
« Reply #16 on: November 11, 2019, 22:50:01 pm »
Yes, you can change this, but it need a Product model class override to include sort by reviews
And of course a template overide to modify the order by list options.
You can contact me in my shop https://shop.st42.fr/fr/vendor/joomla-download-shop/contact if you want hire me.

psm

  • Jr. Member
  • **
  • Posts: 133
Re: Change "Orderby menu" to list of items
« Reply #17 on: November 30, 2019, 19:56:18 pm »
Hello, it is not importnat to sort it according to reviews. Just change current design to suggest one.

But I do not know JS well, can you please advice me more deeply?

Thank you very much

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 9374
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: Change "Orderby menu" to list of items
« Reply #18 on: December 01, 2019, 11:13:18 am »
I really doubt you are going to get someone to code this for you for free... either u know how to do this or you don't
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

psm

  • Jr. Member
  • **
  • Posts: 133
Re: Change "Orderby menu" to list of items
« Reply #19 on: February 05, 2020, 16:11:08 pm »
I found out that it is ok for me to have it in this form:

Code: [Select]
<div class="orderlist collapse">
<?php  
$uri = & JFactory::getURI();
$absolute_url = $uri->toString();
?>

<div><a title="Product Name" href="<?php echo $absolute_url?>/by,product_name?keyword=" class="orderbynew_name">Zoradiť podľa názvu</a></div>
<div><a title="Product Price" href="<?php echo $absolute_url?>/by,product_price.html?keyword=" class="orderbynew_price">Zoradiť podľa ceny</a>
</div>
<div><a title="Product Price" href="<?php echo $absolute_url?>/by,product_price/dirDesc?keyword=" class="orderbynew_price">Zoradiť od najdrahšieho</a></div>
</div>

Problem is that when I use one of this options, my absolute adres contains also condiotion /by.product.... Can you please help me how to fix it?

Thank you

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 9374
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: Change "Orderby menu" to list of items
« Reply #20 on: February 05, 2020, 17:41:09 pm »
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

psm

  • Jr. Member
  • **
  • Posts: 133
Re: Change "Orderby menu" to list of items
« Reply #21 on: February 06, 2020, 14:13:16 pm »
Can you explain me me how do you think it please?

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 9374
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: Change "Orderby menu" to list of items
« Reply #22 on: February 06, 2020, 14:59:30 pm »
remove  /by.product.... from $absolute_url?
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

psm

  • Jr. Member
  • **
  • Posts: 133
Re: Change "Orderby menu" to list of items
« Reply #23 on: February 07, 2020, 11:15:26 am »
Thank you very much, it is done already.