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

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 9648
  • 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: 4329
  • 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: 137
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: 9648
  • 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: 137
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: 9648
  • 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: 137
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: 9648
  • 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: 137
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.

psm

  • Jr. Member
  • **
  • Posts: 137
Re: Change "Orderby menu" to list of items
« Reply #24 on: April 11, 2020, 17:43:29 pm »
Hello,
I find one more problem and it is that when I choose that I want to show more products per page, for example 60, I cannot use order by form correctly.

It is caused due to change in URL:
Correct: https://smartobchod.sk/mobilne-telefony-a-tablety/mobilne-telefony.html/by,product_price.html?keyword=
If I change q-ty --> Incorrect: https://smartobchod.sk/mobilne-telefony-a-tablety/mobilne-telefony.html?limit=60/by,product_price.html?keyword=

There is "limit=60" but this I cannot remove.

Can you please advice me how to fix it?

My code is:
Code: [Select]
$uri = & JFactory::getURI();
    $absolute_url = $uri->toString();
$appended_path = array("/by,product_price/dirDesc.html?keyword=", "/by,product_price.html?keyword=", "/by,product_name.html?keyword=");
$absolute_url_final = str_replace($appended_path,"",$absolute_url); ?>

    <div><a title="Product Name" href="<?php echo $absolute_url_final?>/by,product_name.html?keyword=" class="orderbynew_name">Podľa názvu</a></div>
<div><a title="Product Price" href="<?php echo $absolute_url_final?>/by,product_price.html?keyword=" class="orderbynew_price">Najlacnejšie</a></div>
    <div><a title="Product Price" href="<?php echo $absolute_url_final?>/by,product_price/dirDesc.html?keyword=" class="orderbynew_price">Najdrahšie</a></div>

pinochico

  • 3rd party VirtueMart Developer
  • Jr. Member
  • *
  • Posts: 374
    • MiniJoomla
  • VirtueMart Version: 3
Re: Change "Orderby menu" to list of items
« Reply #25 on: April 11, 2020, 19:04:33 pm »
As sad Patrick - this is custom developping, you can sent email him, I think is not solution for free forum  :)

Every new eshop for client we customized, in this eshop we added sort by stock:
https://www.kolo-park.cz/obchod/kola-a-elektrokola/radit_podle,stav_zasob?keyword=
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds from products, orders and database table
Virtuemart Email Manager - customs email templates