Also can you help me with something else, a I need a simple function to child theme for the Product Catalog page https://zbawcy.pl/katalog
As we are removing the producer name from the Title and we are moving it to attribute pa_producent we would like to display the title (in the catalog as I managed to do it on a single page already) as:
Change the styling of recommended and simillar products to clear as the images are smaller. So on hover show solid background and details of the product and before hover just the image.
The styling of it is up to you because that is outside of support scope and its considered customization.
P.S: If you're looking for professional help in this matter, there's always someone available for such tasks on Codeable website. Pricing and timeline are always straightforward there and that's the main reason for recommending those services.
Yes that hook will show additional if you assign hooks on "kalium_woocommerce_product_loop_after_title". All that matters is to make the container opacity (of item you add) initially zero then on hover of product show that element opacity to 1.
"kalium_woocommerce_product_loop_after_title" is contained in kalium/includes/functions/template/woocommerce-template-functions.phpin few places based on product layout for listing page.
// Get a product instance. I could pass in an ID here.
// I'm leaving empty to get the current product.
$product = wc_get_product();
// Output fabrics in a list separated by commas.
echo $product->get_attribute( 'pa_fabrics' );
// Now that I have $product, I could output other attributes as well.
echo $product->get_attribute( 'pa_colors' );
Also can you help me with something else, a I need a simple function to child theme for the Product Catalog page https://zbawcy.pl/katalog
As we are removing the producer name from the Title and we are moving it to attribute pa_producent we would like to display the title (in the catalog as I managed to do it on a single page already) as:
<h4>Attribute Manufacturer (pa_producent)</h4>
<h3>product title</h3>
Hi bosal,
You can add this code in functions.php:
This will display span.brand-name element if its not empty.
It's almost perfect but how to:
display this attribute inside the a <h3> tag so it would be coresponding with the single page like here:
https://zbawcy.pl/produkt/feudi-salentini-la-torre-primitivo/
I understand it, please remove the previous code and replace with this:
This will prepend producer before product title and also include in the tag you use in Single Product page.ok, great this works for me
Hmm, it works well but it also shows the html in the admin product view, how to avoid that ? attachment
Hi bosal,
I have added an extra check to avoid this happening in admin panel:
This shoukd work for you.Hi can you please help me with the css to the site:
https://zbawcy.pl/katalog
Under the product title: - show rating if there is one
On hover on product I would like to:
- the image to have less opacity (to be mroe white) - show attribute (every in new line, clickable): --Kraj (country) https://zbawcy.pl/cecha/kraj/hiszpania/ --Style https://zbawcy.pl/cecha/smak-styl/polslodkie
https://zbawcy.pl/produkt/castillo-de-maetierra-libalis-frizz-55/
Change the styling of recommended and simillar products to clear as the images are smaller. So on hover show solid background and details of the product and before hover just the image.
Hi bosal,
You can add this code in functions.php to show product rating below title:
https://d.pr/n/Jfqp15
The styling of it is up to you because that is outside of support scope and its considered customization.
P.S: If you're looking for professional help in this matter, there's always someone available for such tasks on Codeable website. Pricing and timeline are always straightforward there and that's the main reason for recommending those services.
Ok thank you:
what about showing additional items on catalog view on item hover like additional product attributes ?
Also what are the template placments for kalium like: kalium_woocommerce_product_loop_after_title where can I find this ?
Also how to show price on this list without hovering on the item ? https://zbawcy.pl/katalog
Hi bosal,
Yes that hook will show additional if you assign hooks on "kalium_woocommerce_product_loop_after_title". All that matters is to make the container opacity (of item you add) initially zero then on hover of product show that element opacity to 1.
"kalium_woocommerce_product_loop_after_title" is contained in kalium/includes/functions/template/woocommerce-template-functions.php in few places based on product layout for listing page.
How about the rest of my question - how to add other attritubutes to the on hover under title links view ?
I've explained, to add attributes on that hook simply assign a function:
So its up to you how do you want to show attributes and the markup structure.
A topic regarding WC Attributes to show programmatically can be found here:
https://stackoverflow.com/questions/41772206/how-to-display-wordpress-woocommerce-custom-attribute-in-templates-functions
Example:
Arlind,
great but... :)
I would like to show the additional attributes on hover like now is the category:
https://zbawcy.pl/katalog
Wha't the action name for that ?
Hi bosal,
In your case, this is the code executed for transparent background layout:
(view large image)
The hook you can attach your custom code is named "kalium_woocommerce_product_loop_after_title"
However, if you want to completely modify the markup then:
1. Open wp-content/themes/kalium/includes/functions/template/woocommerce-template-functions.php
2. Copy the function "kalium_woocommerce_product_loop_item_info" from line 577-735
3. Paste the copied function in functions.php of child theme and add your changes to it.
As I mentioned above this code is executed when transparent background layout is used:
(view large image)
Manage to make it smoothly with your instructions :)
Happy to hear that!
Have a nice day.
Will mark this ticket as solved from here