News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Change "Orderby menu" to list of items

Started by psm, October 09, 2019, 18:17:23 PM

Previous topic - Next topic

GJC Web Design

the info is there but in an awful format..

<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 https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 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
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Studio 42

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

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

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 https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 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
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

psm

I found out that it is ok for me to have it in this form:

<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

GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 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
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

psm

Can you explain me me how do you think it please?

GJC Web Design

remove  /by.product.... from $absolute_url?
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 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
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

psm

Thank you very much, it is done already.

psm

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:
$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

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 for FB, GMC,.. from products, categories, orders, users, articles, acymailing subscribers and database table
Virtuemart Email Manager - customs email templates
Import products for Virtuemart - from CSV and XML
Rich Snippets - Google Structured Data
VirtueMart Products Extended - Slider with products, show Others bought, Products by CF ID and others filtering products