Tagged: x
-
AuthorPosts
-
August 14, 2016 at 11:34 pm #1131363
mdmason23ParticipantHello,
I want to add an image to the “additional information” tab of all the products listed on my website (558 of them!) It is a unit conversion table, but it seems that images cannot be added to this tab. I was also hoping that there would be an easier way of doing it than having to edit every single product in my shop, so I am open to suggestions.
Thanks for any help you can offer.
MoniqueAugust 15, 2016 at 12:22 am #1131391
RupokMemberHi Monique,
Thanks for writing in! If you are trying to add the same image to all Tabs then it’s quite possible.
You can add this under Custom > JavaScript in the Customizer :jQuery(document).ready(function($) { var html = '<img src="http://path/to/your/image.png"/>'; $( html ).appendTo('.single-product .tab-additional-info'); });Let’s change the image path
http://path/to/your/image.pngwith your uploaded image URL.If you still have any issue; kindly provide your URL.
Cheers!
August 15, 2016 at 1:22 am #1131446
mdmason23ParticipantRupok,
I added the code to the custom javascript, but the image still does not show on the tab in my products. I will provide ftp credentials in another private message.
Thanks for your help,
MoniqueAugust 15, 2016 at 1:24 am #1131448
mdmason23ParticipantThis reply has been marked as private.August 15, 2016 at 1:41 am #1131462
RupokMemberHi there,
Thanks for writing back with URL. You need to update the code a bit with right selector for your site :
jQuery(document).ready(function($) { var html = '<img src="https://butterbeescraps.com/wp-content/uploads/2016/08/unit-conversion-table.png"/>'; $( html ).appendTo('.single-product .additional_information_pane'); });I have updated this to make sure it works. If you want to add some spacing or control the styling of the image; you can add this under Custom > CSS in the Customizer.
.additional_information_pane.active > img { margin-top: 25px; }Let’s add your own CSS if needed to control size as well.
Cheers!
August 15, 2016 at 2:15 am #1131484
mdmason23ParticipantRupok,
This is great…thanks for the very quick support!
I do have one more question…how do I center the image? I have tried setting both margin-right and margin-left to auto, but it does nothing.
Monique
August 15, 2016 at 2:18 am #1131487
mdmason23ParticipantRupok,
I also notice that when I add the javascript into the customizer and save, the preview shows my image; however, when I exit the customizer and view the website, no image is appearing. This seems to be happening only when I am logged into the website…I am stumped.
Thanks,
MoniqueAugust 15, 2016 at 2:31 am #1131499
ChristopherModeratorHi there,
Please add
margin-right: auto;margin-left: auto; display: block;in image’s style field.
The image is displaying fine, see the attachments.Thanks.
August 15, 2016 at 10:44 am #1132059
mdmason23ParticipantThanks…for some reason, when I am logged in as admin, the image is not showing on the additional information tab…in customizer or not now. It appears in customizer until I add the margin-left: auto; Margin-right: auto; display: block;…then poof, it’s gone. It will still show when I add your original code above with the margin-top: 25px.
I have logged in with the credentials I provided to you, and the image appears. The image also shows if I’m not logged in.
Any ideas as to why this might be happening?
August 15, 2016 at 11:52 am #1132175
RupokMemberHi there,
I am logged in to your site as well as I tested the code after adding. It’s fine on my end no matter logged in or logged out. It’s working like a charm as you added the code right.
Cheers!
August 15, 2016 at 1:41 pm #1132322
mdmason23ParticipantRupok,
I know it’s fine when you log in…that’s what I said in my previous message. The problem is that it’s not showing the image when I login as I always do using my secure admin credentials that I never give to anyone.
I have purged the cache on my server, plus my web browser cache, but still no image when I am logged in as admin.
Monique
August 15, 2016 at 8:36 pm #1132803
FriechModeratorHi Monique,
Logged in or not, I am seeing the image (table) on my end. Would you mind to clarify how we can replicate this issue?
Thanks.
August 16, 2016 at 9:32 am #1133597
mdmason23ParticipantFriech,
The only way you can replicate it on your end would be to login as admin…not the tempadmin. I’m not going to worry about it…my customers are seeing the image, and that’s the most important thing.
Thanks,
MoniqueAugust 16, 2016 at 12:05 pm #1133854
JoaoModeratorHi Monique,
If you need further help, please let us know.
Joao
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1131363 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
