0

what i try to do,

i add the image upload field to the vendor form (check image 1),its working fine now i want to show that uploaded image in my single product page. i used some code to do that but its not working perfectly(Check the code).My code is not good because its not change the image by vendor, so i need a new code for that change the image by the vendor.(check image 2)if u check the image u see that image come to every product page its not changing with different vendors. i try google but didn't find any reference that why I'm asking u guys. please help me.

My cimy user extra field details check image 3

If some one can help me I'm really glad

image 1

image 2

image 3

the code i used to show image,

function show_shop_qr(){
global $product;
echo'<label for="item_code" class="form-label">Shop QR Code :</label>';
echo"<br>";
$Image1_URL='http://www.instashop.lk/wp-content/uploads/2020/10/download.jpg';  
echo '<img src="'.$Image1_URL.'" width="100" height="100" />';
echo"<br>";}
  • You will need to add more code and explanation. Where is the image save? $product? In your code, you are always calling same file.. – JureW Nov 27 '20 at 13:39
  • i add the image field by cimy user and photo can be upload in vendor edit.I have no idea where its saving.but after i the upload it show in thevendor page. please check the link below http://prnt.sc/vr99xz –  Nov 27 '20 at 13:46
  • i need to show the qr code of every shop of there products so i add image upload field and its uploading.now i dont know how to show that uploaded image in product page,if u can help me to get the image code im using. –  Nov 27 '20 at 13:55
  • ' function show_shop_qr(){ global $product; $seller = get_post_field( 'post_author', $product->get_id()); $vendor = get_user_by( 'id', $seller ); $value = cimy_uef_sanitize_content(get_cimyFieldValue($vendor, 'QRCODE')); echo''; echo"
    "; echo 'Shop_QR_Code'; echo"
    ";} '
    –  Nov 27 '20 at 13:56
  • First of all you need a directory where all pictures will be stored, the directory MUST HAVE this name: 'Cimy_User_Extra_Fields' and MUST BE placed under: "wp-content" dir example: /wp-content/Cimy_User_Extra_Fields directory and give it 777 permissions if you are under Linux (or 770 and group to "www-data" if you are under Ubuntu Linux). –  Nov 27 '20 at 14:01
  • i think image store in above comment place –  Nov 27 '20 at 14:02

0 Answers0