Forum Replies Created
-
AuthorPosts
-
fespigado
ParticipantHi Ernest.
I have deleted as you indicate. Now it does not find the attributes and returns “no results”.I have to set it up somewhere else?
Thanks
fespigado
ParticipantHi Ernest.
Thanks for the code. I’ll try this weekend.The taxonomies are configured.
The problem is that instead of showing the products with the image, title, etc. As you see in the image if you are looking for sku. It shows the attribute and thus it can not be.fespigado
ParticipantSorry, one more thing.
How to configure in index table when searching by attribute, results in products and not the attribute.
Attached image.
Thank you
Fernando
—fespigado
ParticipantOk Ernest.
How can i get the previous version? Can you send me?Thanks
fespigado
ParticipantMore images…
fespigado
ParticipantGood morning Ernest,
after setting the table index we found two problems. The first problem is that it does not identify the new attribute “Test” to include it in the list of “Source2”, as you can see in the image. Second problem, not find the product if I add (4), (45) or (456). What solution can we apply?I attach images, if you need something else do not hesitate to ask me.
fespigado
ParticipantHi Ernest,
I need to finish the work of my Client.
I need your guidance to make the searches discussed above work. I have already created the index table. What is the next step?Fernando
—fespigado
ParticipantHi Ernest,
It has not been clear to me how I should proceed to get the search configuration.
Can you help me please.fespigado
ParticipantGood morning Ernest,
is this release the one we need?
If yes, where can I see the information I need to deploy index table and configure the searches?Fernando
—fespigado
ParticipantHi Ernest,
The new release is not yet available. True?
You already have the documentation to be able to configure table engine to get what we are looking for?Best regards,
Fernando
—fespigado
ParticipantHi Ernest,
I send you an image of how it works now. Everything is correct. If I look for rbj102440 look for correct product. What I need is that if we put a value between the parentheses, when the user searches without the parenthesis find it. Example: Attribute rbj102440 (123) the user searches for rbj102440123 and finds it.
Thanks
fespigado
ParticipantAs promised, I share the code to show the stock in the search results if it is greater than 0. thanks for your help
add_filter( ‘asp_results’, ‘asp_stock_to_content’, 1, 1 );
function asp_stock_to_content( $results ) {
$custom_field = “_stock”;foreach ($results as $k=>$v) {
if ($v->content_type != “pagepost” || $v->post_type != “product”)
continue;
if ( function_exists(‘get_field’) )
$meta_value = get_field( $v->id, $custom_field, true ); // ACF support
else
$meta_value = get_post_meta( $v->id, $custom_field, true );
// Modify the post title to add the meta valueif ( $meta_value > 0)
$results[$k]->content .= ‘<br>Stock: ‘ . intval($meta_value) . ‘‘;
else
continue;
}return $results;
}fespigado
ParticipantHi Ernest,
thanks for the information.
The project I’m talking about is not on the wordpress platform.
It’s an adhoc project.fespigado
ParticipantHi,
sorry for my bad english.
What I mean is that the stock does not appear but the product should appear.fespigado
ParticipantSorry Ernest,
but still looking for products in stock 0 searches.I´ve add added 1 more condition but it does not work.
**********************************************************
add_filter( ‘asp_results’, ‘asp_stock_to_content’, 1, 1 );
function asp_stock_to_content( $results ) {
$custom_field = “_stock”;foreach ($results as $k=>$v) {
if ($v->content_type != “pagepost” || $v->post_type != “product”)
continue;
if ( function_exists(‘get_field’) )
$meta_value = get_field( $v->id, $custom_field, true ); // ACF support
else
$meta_value = get_post_meta( $v->id, $custom_field, true );
// Modify the post title to add the meta value
if ( !empty($meta_value) || $meta_value <=0)
$results[$k]->content .= ‘<br>Stock: ‘ . intval($meta_value) . ‘‘;
}return $results;
} -
AuthorPosts