Post by leny151180 » Sun Apr 07, 2019 3:58 am

Hi, I'm using opencart version 3.0.2.0. When searching from the home search section, I want to search for words written in the product description.
How can I do that?

Newbie

Posts

Joined
Sun Apr 07, 2019 3:56 am

User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by letxobnav » Sun Apr 07, 2019 7:22 pm

Better not.

Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces

“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.


User avatar
Expert Member

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan

User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by letxobnav » Sun Apr 07, 2019 8:00 pm

absolutely better not.

Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces

“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.


User avatar
Expert Member

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan

Post by paulfeakins » Mon Apr 08, 2019 5:33 pm

letxobnav wrote:
Sun Apr 07, 2019 8:00 pm
absolutely better not.
What do you mean? Please back this up with some info ...

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Legendary Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by letxobnav » Mon Apr 08, 2019 5:54 pm

The first extension suggestion does not address the request at all which is plain time wasting for the OP.
The second suggestion uses code to override the checkbox value on search, rendering the checkbox useless, stupid idea.

We are talking about the search-box in the header which is controlled via javascript in the common.js file.
All that is required is to add "&description=true" to the link in that file:

Code: Select all

url += '&search=' + encodeURIComponent(value);
to

Code: Select all

url += '&search=' + encodeURIComponent(value) + '&description=true';
which forces the search in description and leaves the "search description" checkbox function intact.


I hate it when people just dump some extension suggestions on others without even bothering to look into it, then just shut up.

Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces

“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.


User avatar
Expert Member

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan

Post by paulfeakins » Mon Apr 08, 2019 6:05 pm

Very good answer, thanks!

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Legendary Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by letxobnav » Mon Apr 08, 2019 6:26 pm

It should be forum policy that you may not suggest an extension you have not tried yourself.

Then you may only say:
"Please search in the marketplace and may your God be with you."

Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces

“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.


User avatar
Expert Member

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan

Post by waynec444 » Fri Oct 25, 2019 2:48 am

Do not find that string in the common.js file.

New member

Posts

Joined
Sun Oct 06, 2019 11:53 pm

Post by by mona » Fri Oct 25, 2019 7:44 am

Look again or discuss with your theme developer ..

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by paulfeakins » Fri Oct 25, 2019 5:52 pm

letxobnav wrote:
Mon Apr 08, 2019 6:26 pm
It should be forum policy that you may not suggest an extension you have not tried yourself.
I think as long as you say you haven't tried it but it looks like it's supposed to do the job that's enough. Especially if it's by a good developer like ClearThinking or iSense.

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Legendary Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by letxobnav » Fri Oct 25, 2019 6:19 pm

That is indeed true, reputation counts.

Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces

“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.


User avatar
Expert Member

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan

Post by waynec444 » Sat Oct 26, 2019 4:56 am

I see my error. It gets confusing after a while.
Here is the contents of my common.js file
I have read it over several times and do not see the string. Maybe I just don't see it (the text search does not work in this file).

function getURLVar(key) {
var value = [];

var query = String(document.location).split('?');

if (query[1]) {
var part = query[1].split('&');

for (i = 0; i < part.length; i++) {
var data = part.split('=');

if (data[0] && data[1]) {
value[data[0]] = data[1];
}
}

if (value[key]) {
return value[key];
} else {
return '';
}
}
}

$(document).ready(function() {
//Form Submit for IE Browser
$('button[type=\'submit\']').on('click', function() {
$("form[id*='form-']").submit();
});

// Highlight any found errors
$('.text-danger').each(function() {
var element = $(this).parent().parent();

if (element.hasClass('form-group')) {
element.addClass('has-error');
}
});

// tooltips on hover
$('[data-toggle=\'tooltip\']').tooltip({container: 'body', html: true});

// Makes tooltips work on ajax generated content
$(document).ajaxStop(function() {
$('[data-toggle=\'tooltip\']').tooltip({container: 'body'});
});

// https://github.com/opencart/opencart/issues/2595
$.event.special.remove = {
remove: function(o) {
if (o.handler) {
o.handler.apply(this, arguments);
}
}
}

// tooltip remove
$('[data-toggle=\'tooltip\']').on('remove', function() {
$(this).tooltip('destroy');
});

// Tooltip remove fixed
$(document).on('click', '[data-toggle=\'tooltip\']', function(e) {
$('body > .tooltip').remove();
});

$('#button-menu').on('click', function(e) {
e.preventDefault();

$('#column-left').toggleClass('active');
});

// Set last page opened on the menu
$('#menu a[href]').on('click', function() {
sessionStorage.setItem('menu', $(this).attr('href'));
});

if (!sessionStorage.getItem('menu')) {
$('#menu #dashboard').addClass('active');
} else {
// Sets active and open to selected page in the left column menu.
$('#menu a[href=\'' + sessionStorage.getItem('menu') + '\']').parent().addClass('active');
}

$('#menu a[href=\'' + sessionStorage.getItem('menu') + '\']').parents('li > a').removeClass('collapsed');

$('#menu a[href=\'' + sessionStorage.getItem('menu') + '\']').parents('ul').addClass('in');

$('#menu a[href=\'' + sessionStorage.getItem('menu') + '\']').parents('li').addClass('active');

// Image Manager
$(document).on('click', 'a[data-toggle=\'image\']', function(e) {
var $element = $(this);
var $popover = $element.data('bs.popover'); // element has bs popover?

e.preventDefault();

// destroy all image popovers
$('a[data-toggle="image"]').popover('destroy');

// remove flickering (do not re-add popover when clicking for removal)
if ($popover) {
return;
}

$element.popover({
html: true,
placement: 'right',
trigger: 'manual',
content: function() {
return '<button type="button" id="button-image" class="btn btn-primary"><i class="fa fa-pencil"></i></button> <button type="button" id="button-clear" class="btn btn-danger"><i class="fa fa-trash-o"></i></button>';
}
});

$element.popover('show');

$('#button-image').on('click', function() {
var $button = $(this);
var $icon = $button.find('> i');

$('#modal-image').remove();

$.ajax({
url: 'index.php?route=common/filemanager&user_token=' + getURLVar('user_token') + '&target=' + $element.parent().find('input').attr('id') + '&thumb=' + $element.attr('id'),
dataType: 'html',
beforeSend: function() {
$button.prop('disabled', true);
if ($icon.length) {
$icon.attr('class', 'fa fa-circle-o-notch fa-spin');
}
},
complete: function() {
$button.prop('disabled', false);

if ($icon.length) {
$icon.attr('class', 'fa fa-pencil');
}
},
success: function(html) {
$('body').append('<div id="modal-image" class="modal">' + html + '</div>');

$('#modal-image').modal('show');
}
});

$element.popover('destroy');
});

$('#button-clear').on('click', function() {
$element.find('img').attr('src', $element.find('img').attr('data-placeholder'));

$element.parent().find('input').val('');

$element.popover('destroy');
});
});
});

// Autocomplete */
(function($) {
$.fn.autocomplete = function(option) {
return this.each(function() {
var $this = $(this);
var $dropdown = $('<ul class="dropdown-menu" />');

this.timer = null;
this.items = [];

$.extend(this, option);

$this.attr('autocomplete', 'off');

// Focus
$this.on('focus', function() {
this.request();
});

// Blur
$this.on('blur', function() {
setTimeout(function(object) {
object.hide();
}, 200, this);
});

// Keydown
$this.on('keydown', function(event) {
switch(event.keyCode) {
case 27: // escape
this.hide();
break;
default:
this.request();
break;
}
});

// Click
this.click = function(event) {
event.preventDefault();

var value = $(event.target).parent().attr('data-value');

if (value && this.items[value]) {
this.select(this.items[value]);
}
}

// Show
this.show = function() {
var pos = $this.position();

$dropdown.css({
top: pos.top + $this.outerHeight(),
left: pos.left
});

$dropdown.show();
}

// Hide
this.hide = function() {
$dropdown.hide();
}

// Request
this.request = function() {
clearTimeout(this.timer);

this.timer = setTimeout(function(object) {
object.source($(object).val(), $.proxy(object.response, object));
}, 200, this);
}

// Response
this.response = function(json) {
var html = '';
var category = {};
var name;
var i = 0, j = 0;

if (json.length) {
for (i = 0; i < json.length; i++) {
// update element items
this.items[json['value']] = json;

if (!json['category']) {
// ungrouped items
html += '<li data-value="' + json['value'] + '"><a href="#">' + json['label'] + '</a></li>';
} else {
// grouped items
name = json['category'];
if (!category[name]) {
category[name] = [];
}

category[name].push(json);
}
}

for (name in category) {
html += '<li class="dropdown-header">' + name + '</li>';

for (j = 0; j < category[name].length; j++) {
html += '<li data-value="' + category[name][j]['value'] + '"><a href="#">&nbsp;&nbsp;&nbsp;' + category[name][j]['label'] + '</a></li>';
}
}
}

if (html) {
this.show();
} else {
this.hide();
}

$dropdown.html(html);
}

$dropdown.on('click', '> li > a', $.proxy(this.click, this));
$this.after($dropdown);
});
}
})(window.jQuery);
Last edited by waynec444 on Sun Oct 27, 2019 2:49 am, edited 1 time in total.

New member

Posts

Joined
Sun Oct 06, 2019 11:53 pm

Post by IP_CAM » Sat Oct 26, 2019 7:09 am

Please search in the marketplace and may your God be with you
Well, that's the Problem, not everybody believes in the same God, and some Gods
don't work for everybody, for never getting a soul in retourn. :laugh:

My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by waynec444 » Sun Oct 27, 2019 2:38 am

No point in being sarcastic. If you don't have something constructive to say just don't say anything. I would expect EVERYONE in the community forum has a legitimate issue that they cannot find the answer to. YOU may have ALL the answers, but not everyone does. Be courteous.

New member

Posts

Joined
Sun Oct 06, 2019 11:53 pm

Post by waynec444 » Sun Oct 27, 2019 2:54 am

by mona wrote:
Fri Oct 25, 2019 7:44 am
Look again or discuss with your theme developer ..
I am using a theme from OC. No outside theme.

New member

Posts

Joined
Sun Oct 06, 2019 11:53 pm

Post by thekrotek » Sun Oct 27, 2019 4:27 am

You, really, really, REALLY should stop posting like 10 topics per day, having zero skills and expecting everyone to teach you for free. If you want to code everything yourself, start with basic PHP/JS/CSS coding tutorials and learn the MVC concept, which OpenCart follows quite strictly. Otherwise expect more fun time with sarcastic replies in the future.

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by letxobnav » Sun Oct 27, 2019 7:00 am

you have installed version 3.1.0.0 beta, don't!

It is not tested and it adds nothing, just the same stuff done differently making everybodies upgrade life so much harder.

Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces

“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.


User avatar
Expert Member

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan

Post by waynec444 » Mon Oct 28, 2019 8:55 am

I have installed v3.0.3.2 April 09, 2019. Not a beta. Installed in October, 2019.

I have never had a program before that does not work as it is supposed to out of the box (with many issues with the default options). IF it worked as designed, I would have had very few posts (and I don't post many issues a day -so far about 28 in about a month). These default issues should NOT have required any posting, they should work as designed with NO issues whatsoever. I have added maybe two or three extensions that do various minor tweaks that do NOT affect the basic program operations (such as doing nothing with checkout except for ordering more items than I have in stock). Many issues have surfaced before making any changes at all.

Examples : New person checkout does not work, The flat rate shipping module does not work (says I have not entered shipping info or set it up right - I have), "You do not have permission to access this page, please refer to your system administrator" etc.

The others have been about doing "tweaks" that I have NOT found anywhere else (or for the current release).

What is the forum for? I thought it was to help new users to resolve issues, most of them are not tweaks (most of my posts). Most of the suggestions for tweaks have worked and I thank those who posted useful info. Many of the issues concern default processes that do not work or work right.

IF you don't want to offer constructive help, I would rather you help someone else. I want to hear from people who really care and want to help newbies like me. Or is this forum is only for those who are experienced and know most everything.

Finally, some of the issues have not been resolved as of yet and the program cannot be used until they are.

I do NOT just post issues to post.

New member

Posts

Joined
Sun Oct 06, 2019 11:53 pm
Who is online

Users browsing this forum: Google [Bot], Semrush [Bot] and 48 guests