News:

Looking for documentation? Take a look on our wiki

Main Menu

Search in Shop

Started by Tryer, May 19, 2016, 20:02:16 PM

Previous topic - Next topic

Tryer

I am using VM 3.0.16 0n a new Joomla 3.5.1 site.

1 - I am confused by the display of "Search in Shop" with every product when I have the VM -Search in Shop module unpublished. How can I remove the Search in Shop field and button?

2 - As a secondary issue, the Search in Shop function dies not seem to work although I have read on this forum that it may only be searching within a single product category. The behaviour of the search field is odd to say the least. The field and the associated search button are poorly aligned (vertically) and when the button is clicked the search field shrinks to a much smaller size during the search process. Is that what is supposed to happen?

Comments appreciated.

GJC Web Design

without a live site url how could anyone help u?

have u looked at the demo?
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

Tryer

I have found that during the development of a new site, which may not yet be live, most forums are able to offer some sort of advice or direction if a reasonable description of a problem is offered.

Yes, I have looked at the demo site but was unable to get an answer to this particular issue. I have also spent a lot of time searching through forum posts before posting.

However, I have now built the site to a stage where it is possible to make it visible for a brief period. A relevant page can be seen at:
http://www.openphotographicsociety.org/joomla35/shop-and-tools/shop/distinction-fees

I don't pretend to be any expert on this subject. Indeed I am a beginner and an ordinary human being who struggles to understand many aspects of the web. I suspect I am not alone in that. However I do try to be courteous when seeking advice from others.

Comments and suggestions would be appreciated.

jenkinhill

Now that you have posted a URL it is possible to see that you are not using the default VirtueMart templates, but are using a commercial template with overrides.

1. If you use Firebug you can see that the div holding the search box has the class virtuemart_search so can be hidden with css if you want to hide it, although you could simply unpublish the VM search module in Joomla's module manager.

2. The search parameters are set in the VM search module configuration.

As for alignment, Firebug shows that this can be corrected in your template by adding some top_margin to the input box -  the  class used is  .virtuemart_search .inputbox
The size change on search is Joomla template related so maybe you should take this up with your template supplier.

See http://forum.virtuemart.net/index.php?topic=116620.0
and http://forum.virtuemart.net/index.php?topic=108212.0
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Tryer

Thanks for your helpful reply - it is appreciated.

One of the aspects of this that totally confuses me is that the VM-Search module is unpublished!! How can it therefore appear as it does on the site? Is this something for Virtuemart or the template?

Thanks

AH

That is a template thing - clearly the template is getting the search - regardless of joomla module settings
Regards
A

Joomla 4.4.5
php 8.1

jenkinhill

It is a case of a template developer thinking they know better than the user, so they remove choice. A good reason for being very careful about template choice!
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Tryer

Thanks to Ah and jenkinhill for you replies and advice. I will make contact with the template supplier.

I take note of your comment regarding care when selecting a template, but for someone like me it is near impossible to foresee a problem of this level of detail at the beginning of a project. Actually, the same template was fine (ie no enforced shop search) before I upgraded to Joomla 3.5.1 from Joomla 2.5.28. The template did not change since it was compatible with both versions of Joomla.

Thanks again

Tryer

As a follow-up to the comments I have now reverted to all the default Virtuemart templates - choosing" Joomla default" for the shop template and category template, and "default" for the home page template. The VM - Search in Shop module is unpublished and has no menu assignments. However, the link below shows that the "Search in Shop" facility is still shown.

http://www.openphotographicsociety.org/joomla35/shop-and-tools/shop/distinction-fees

I recently upgraded this site from Joomla 2.5.28 to Joomla 3.5.1, and as part of this process also upgraded to the latest version of Virtuemart 3.0.16 (from Virtuemart 2.6.20 with the Joomla 2.5 site). I am using PHP 5.4. The JSN Tendo template has not changed since it was compatible with both Joomla 2.5 and Joomla 3.5. My simple logic seems to suggest that the appearance of the "Search in Shop" facility must therefore be a consequence of eith (or both) the Joomla upgrade or the Virtuemart upgrade.

I cannot believe that the VM- Search in Shop module is being used when it is unpublished and has no menu assignments. The search module is surely coming from somewhere else.

Any further thoughts would be appreciated.

GJC Web Design

That is not the search module

it is the search box that is normally shown at the top of the category description page when you make a search..
the cat template is the same file as the product search results
components\com_virtuemart\views\category\tmpl\default.php

if no over ridden

it normally has an if

if (!empty($this->keyword)) { 

meaning if the url has a keyword in it

if (!empty($this->keyword)) {
//id taken in the view.html.php could be modified
$category_id  = vRequest::getInt ('virtuemart_category_id', 0); ?>
<h3><?php echo $this->keyword?></h3>

<form action="<?php echo JRoute::('index.php?option=com_virtuemart&view=category&limitstart=0'FALSE); ?>" method="get">

<!--BEGIN Search Box -->
<div class="virtuemart_search">
<?php echo $this->searchCustomList ?>
<br/>
<?php echo $this->searchCustomValues ?>
<input name="keyword" class="inputbox" type="text" size="20" value="<?php echo $this->keyword ?>"/>
<input type="submit" value="<?php echo vmText::('COM_VIRTUEMART_SEARCH'?>" class="button" onclick="this.form.keyword.focus();"/>
</div>
<input type="hidden" name="search" 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?>"/>

</form>
<!-- End Search Box -->
<?php  ?>


check your template does or just remove that whole block .. but then on search results you wont have the search box
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

Tryer

Thank you for your detailed reply - it is appreciated.

However, I removed the section of code indicated and it made no difference in the front end. The Search in shop remains firmly in place. I cleared cache etc etc but to no avail.

Any further thoughts?

Jörgen

Then Your view is overridden in Your template. remove the same code there.

regards

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

Tryer

Thank you.

OK, that did it! The category template was being overridden by the template despite , in Virtuemart/configuration/templates, having the category layout set to "No override" and the default templates being set to "Joomla default".

Thank you for your help and persistence!

Jörgen

Nice that it worked.

Jooomla default does not mean no overrides, it just mean that You are using the default template for Joomla. This template can of course have overrides, which it had in Your case.

regards

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

Tryer

OK, thanks. However, I am still unclear about one aspect of why my original settings did not work. In Virtuemart - configuration - templates - shopfront settings - category layout I had set "No overrides" (rather than "Default"). I thought that meant than no category layout overrides would be applied - apparently not.