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

Search in Shop (NOT THE MODULE)

Started by claudio65, May 30, 2019, 23:46:23 PM

Previous topic - Next topic

claudio65

Hi, there!
I am using Joomla! 3.9.6 with Helix 3 Template, and VM 3.4.2.
Issues about "Search in Shop" functionality.
Please note that IT IS NOT THE "VM - Search in Shop" MODULE.
Independente if I am using the VM - Search in Shop module or not, it's shown at the top of the VM pages.
Issues:
- It only searches inside the current category the user is. I want it searches the entire shop, don't matter wich category the user is.
- Don´t know how can I configure it (not customization, only configuration).
- If there is no configurations, so how can I customize it (where are the files that compose it)?

I searched a lot of places at the web, but the answers are always about the VM - Search in Shop module.
But I repeat, it is not the VM - Search in Shop" module, it's a completely different functionality.
Apparently it's something that belongs to the VM core, or the VM default template, I don't know.
Please, I'm in it for days, please, someone help me.
Thank You! 

Studio 42

Apparently it's a Search module from the template ?
In some case you have a category on left so you can select a category(or not) but this is feature provided by the template devs

claudio65

Quote from: Studio 42 on May 31, 2019, 03:12:22 AM
Apparently it's a Search module from the template ?
In some case you have a category on left so you can select a category(or not) but this is feature provided by the template devs

I didn't understand nothing!
I'm a kind of stupid.
Can you explaine it a little better?

claudio65

Well, finally I found it.
It's a functionality inside Templates>>Front End Configs.
You can just disable it clicking on "show search - Y/N".
And the code is this:

<!--BEGIN Search Box -->
<div class="virtuemart_search">
<form action="<?php echo JRoute::('index.php?option=com_virtuemart&view=category&limitstart=0'FALSE); ?>" method="get">
<?php if(!empty($this->searchCustomList)) { ?>
<div class="vm-search-custom-list">
<?php echo $this->searchCustomList ?>
</div>
<?php ?>

<?php if(!empty($this->searchCustomValues)) { ?>
<div class="vm-search-custom-values">
<?php
                
echo ShopFunctionsF::renderVmSubLayoutAsGrid(
                    
'searchcustomvalues',
                    array (
                        
'searchcustomvalues' => $this->searchCustomValues,
                        
'options' => array (
                            
'items_per_row' => array (
                                
'xs' => 2,
                                
'sm' => 2,
                                
'md' => 2,
                                
'lg' => 2,
                                
'xl' => 2,
                            ),
                        ),
                    )
                );
                
?>

</div>
<?php ?>
<div class="vm-search-custom-search-input">
<input name="keyword" class="inputbox" type="text" size="40" value="<?php echo $this->keyword ?>"/>
<input type="submit" value="<?php echo vmText::('COM_VIRTUEMART_SEARCH'?>" class="button" onclick="this.form.keyword.focus();"/>
<?php //echo VmHtml::checkbox ('searchAllCats', (int)$this->searchAllCats, 1, 0, 'class="changeSendForm"'); ?>
<span class="vm-search-descr"> <?php echo vmText::_('COM_VM_SEARCH_DESC'?></span>
</div>

<!-- input type="hidden" name="showsearch" value="true"/ -->
<input type="hidden" name="view" value="category"/>
<input type="hidden" name="option" value="com_virtuemart"/>
<input type="hidden" name="virtuemart_category_id" value="<?php echo $category_id?>"/>
<input type="hidden" name="Itemid" value="<?php echo $this->Itemid?>"/>
</form>
</div>
<!-- End Search Box -->


I have no idea how to this, make the it search all categories ans not only the one the user is watching.
If someone wants to help me, I appreciate.

GJC Web Design

try

<input type="hidden" name="virtuemart_category_id" value="0"/>
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

claudio65

Uh Uh!
It works!
Thank you very much.
It was so obvious, I don´t know why I didn't tought in it.
Just give no category so then, it will search at all categories.
Once again, thank You!