Home › Forums › Basel support forum › SKU instead of price
SKU instead of price
- This topic has 18 replies, 2 voices, and was last updated 6 years, 11 months ago by Artem Temos.
-
AuthorPosts
-
November 30, 2017 at 8:36 am #26327
OscarParticipantHi could you please tell me on shop product thumbnail list page (shop page) as you can see at the moment under the product image thumb, under the product title there is price. But I want to display:none that price and instead of I want to display SKU code. How can we achieve this please? BIG THANX
Attachments:
You must be logged in to view attached files.November 30, 2017 at 9:24 am #26349
Artem TemosKeymasterHi,
Try to add this code snippet to the functions.php file in the child theme to achieve that
add_action( 'woocommerce_before_shop_loop_item_title', 'custom_before_title' ); function custom_before_title() { global $product; if ( $product->get_sku() ) { echo $product->get_sku(); } }
Regards
December 1, 2017 at 6:56 am #26446
OscarParticipantHi Keymaster it worked as you can see on this page the SKU code exactly where I want:
LINK 1But on this page I need the SKU code under the thumb image just before title but because of the above line of codes you sent me on this page SKU code went above the image:
LINK 2Please also see the attached JPG
THANK YOU VERY MUCHAttachments:
You must be logged in to view attached files.December 1, 2017 at 7:49 am #26458
Artem TemosKeymasterHi,
Try to replace with this code
add_action( 'woocommerce_shop_loop_item_title', 'custom_before_title', 20 ); function custom_before_title() { global $product; if ( $product->get_sku() ) { echo '<span class="product-grid-sku"><span>SKU - </span>' . $product->get_sku() . '</span>'; } }
December 1, 2017 at 8:03 am #26469
OscarParticipantTHANK YOU VERY MUCH it worked
Only now can you please look at the attached jpg here
on product list page when I click the + icon to view the product pop up window I have little issue left. thanxAttachments:
You must be logged in to view attached files.December 1, 2017 at 8:28 am #26473
OscarParticipantTHANK YOU VERY MUCH it worked
I have only 2 issues left:
-please look at the attached jpg here on product list page when I click the + icon to view the product pop up window
– And on product detail page I need not to display wishlist and compare row as seen on second jpg
THANXAttachments:
You must be logged in to view attached files.December 1, 2017 at 10:50 am #26500
Artem TemosKeymasterHi,
Use this code snippet
.sku_wrapper { display: none!important; }
As for compare and wishlist, you can disable these plugins completely in Plugins section.
December 1, 2017 at 11:06 am #26509
OscarParticipantHi there perfect it worked THANK YOU
On the same product detail page I want to keep the product page design as DEFALT. But at the bottom the share buttons not small grey ones but circled colored ones. As the attached image. How can I? thanxAttachments:
You must be logged in to view attached files.December 1, 2017 at 12:41 pm #26548
Artem TemosKeymasterFind the code in the file `woocommerce/content-single-product.php
<?php echo basel_shortcode_social( array( 'type' => basel_get_opt( 'product_share_type' ), 'size' => 'small', 'align' => 'left' ) ); ?>
and replace with this one
<?php echo basel_shortcode_social( array( 'type' => basel_get_opt( 'product_share_type' ), 'size' => 'small', 'align' => 'colored' ) ); ?>
December 1, 2017 at 12:43 pm #26550
OscarParticipanttHANX but how to put that file into child-theme please?
what will be the folder and file structure?
/child-theme/ …?/…?December 1, 2017 at 12:50 pm #26552
Artem TemosKeymasterCopy this file to the exact location but in the child theme and then edit it.
December 1, 2017 at 12:52 pm #26554
OscarParticipantwoocommerce under the plugin directory or
under the theme/basel/woocommerce ?December 1, 2017 at 12:57 pm #26558
Artem TemosKeymasterUnder our theme folder.
December 1, 2017 at 1:07 pm #26561
OscarParticipantWith some reason it didnt work 🙁
pls see the attached two jpgsAttachments:
You must be logged in to view attached files.December 1, 2017 at 2:22 pm #26581
Artem TemosKeymasterAre you able to provide us your FTP access so we can check it?
December 1, 2017 at 7:01 pm #26625
OscarParticipantHere below
thanxDecember 1, 2017 at 10:53 pm #26656
Artem TemosKeymasterSorry, we gave you a wrong code snippet. Check how it works now.
December 2, 2017 at 5:44 am #26685
OscarParticipantTHANK YOU VERY VERY MUCH
December 2, 2017 at 8:28 am #26705
Artem TemosKeymasterYou are welcome!
-
AuthorPosts
Tagged: sku
The topic ‘SKU instead of price’ is closed to new replies.
- You must be logged in to create new topics. Login / Register