Mike Jolley on "Search feature change in WooCommerce?"

ساخت وبلاگ

sethbahookey
Member
Posted 1 week ago #

Hi Team,

I have a website setup so that the end user would type in a SKU# to identify the product they need to purchase. A few months ago this worked great.. enter in SKU and it would take your right to that product's page.

Now when you type in the SKU it takes you to a product list page and it will only show the one item where you have to click it to then get to the product page.

Any idea why this happened? Did something change with one of the upgrades?

https://wordpress.org/plugins/woocommerce/

I think you may have done this via a snippet. Have you updated your theme perhaps? Changes in your functions.php file may have been lost.

sethbahookey
Member
Posted 6 days ago #

Thanks for the response!

Is there a snippet that I can add to the functions page that would make it so when a customer enters in a sku number it takes them right to that product page instead of the search results page?

Actually just realised core does this for you but ONLY if there is one search result.

sethbahookey
Member
Posted 7 hours ago #

Hey Mike,

Is this something new? When I first created this site I never had this issue. Where would I be able to deactivate this functionality as when I have a customer enter in the SKU# I would like it to take them directly to the product page instead of the search results page.

Thanks!
Seth

Actually just realised core does this for you but ONLY if there is one search result.

If there is one result, it should redirect first, unless your SKU search is doing it. WC doesn't search custom fields by default.

WordPress ...
ما را در سایت WordPress دنبال می کنید

برچسب : نویسنده : استخدام کار wpss بازدید : 81 تاريخ : پنجشنبه 16 ارديبهشت 1395 ساعت: 16:04