- This topic has 7 replies, 2 voices, and was last updated 5 years, 12 months ago by
Tom.
-
AuthorPosts
-
November 30, 2017 at 1:21 pm #439075
claudio
ello i have a problem “similar” to the one decribed in this post
https://generatepress.com/forums/topic/gp-premium-woocommerce-integration/
I’m running the tests on site.
in the product page I can’t see the button add to chart and cart is empty
If I change the theme to Twenty Seventeen for example, the products are shown correctly.
only if you access the product page through the shop page you can see the add to chart button
is it possible to do the following with generatepress ?.
1.search the product in the homepage ( test searching ” avenida”)
2. click on the respective link and in the product page click the button add cart
i’m really agree with this template but I don’t know if it is possible to do what I need
thanks
November 30, 2017 at 8:49 pm #439254Tom
Lead DeveloperLead DeveloperHi there,
I’m not sure I understand – I’m not seeing the shop page on your website?
On the shop page (set in your WooCommerce settings), the products aren’t showing up?
December 1, 2017 at 3:21 pm #439783claudio
hello.
thank you for reply.
only from the shop page we can view the button “add to cart” in the product page?. Is that required?
because when I change to template twenty fifteen I can view the button “add to cart” to the product page from the search box on the homepage (not from shop page).
you can see the shop page if you click “view you shopping cart” (display cart in menu) then click in the button return to shop.
I hope my question is understood. (i saw the video on the official website : generatepress.com/woocommerce/)
thanksDecember 1, 2017 at 11:50 pm #439880Tom
Lead DeveloperLead DeveloperSo when you use the search bar in the widget, you want it to search your products using the WooCommerce template?
December 8, 2017 at 7:04 am #444812claudio
hello,I’m sorry for my delay.
yes, i want use search bar in the widget and search the products using the woocommerce, when I change the theme to Twenty Seventeen for example, that´s work fine (the user can view the button “add to cart”).obviously change the post search to product search in the file functions.php.Is that possible with generate press?, if you could please tell me if it’s possible or not.
thanksDecember 8, 2017 at 7:43 pm #445296Tom
Lead DeveloperLead DeveloperIf you’re using the navigation search, you can do this:
add_filter( 'generate_navigation_search_output', 'tu_wc_navigation_search' ); function tu_wc_navigation_search() { printf( '<form method="get" class="search-form navigation-search" action="%1$s"> <input type="search" class="search-field" value="%2$s" name="s" title="%2$s"> <input type="hidden" name="post_type" value="product"> </form>', esc_url( home_url( '/' ) ), esc_attr( get_search_query() ), esc_attr_x( 'Search', 'label', 'generatepress' ) ); }
If you’re using a regular search widget, you would have to overwrite the searchform.php file in your child theme and add this line below the first
<input>
:<input type="hidden" name="post_type" value="product">
December 11, 2017 at 4:29 pm #447346claudio
hello, thank you for the answer and my apologies but I still don’t have an answer to my question.
for example in the following link i’ve changed the template and the add to cart button appears but if I change to generate press disappears.
https://domovil.com/info/product/avenida-argentina-2354-santiago-de-chile/
I didn’t make any changes just change the template, why the “add to cart” button disappears in generatepress ?.
sorry but i need to know :
can i do it look like above but with generatepress?. thanks
December 11, 2017 at 11:22 pm #447469Tom
Lead DeveloperLead DeveloperWere you using a search bar in a widget area, or in your navigation?
-
AuthorPosts
- You must be logged in to reply to this topic.