Basically, Product image on showing.
i try this method as given below. after product image appeared , banner background picture stop to showing.
Open PluginListGenerator.php file located at vendor/magento/framework/Interception.
Replace the line
$cacheId = implode('|', $this->scopePriorityScheme) . "|" . $this->cacheId;
with below:
$cacheId = implode('-', $this->scopePriorityScheme) . "-" . $this->cacheId;
Save the PluginListGenerator.php file.
I have try this code, problem solved but after that banner image not showing.
Related
guys i use TCPDF library for my php server and i want to create a label with width:57mm and height:32mm
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
$pdf->SetPrintHeader(false);
$pdf->SetPrintFooter(false);
$pdf->AddPage('L', array(57,32));
$pdf->SetFont('dejavusans');
$html ="
<table class='domi'>
<tbody >";
for($i=0; $i<$rows; $i++){
$style=' style="font-size:'.$fontsize[0][$i].'px"';
if($bold[0][$i]===0){
$html2a[$i] = "<tr><td".$style.">".$content_line[$i]."</td></tr>";
} else {
$html2a[$i] = "<tr><td".$style."><b>".$content_line[$i]."</b></td></tr>";
}
$html2b .= $html2a[$i];//$pdf->GetStringWidth($html2a[$i])." ";
}
$html3 = "</tbody>
</table>";
$pdf->writeHTMLCell($w=55, $h=2, $x='1', $y='1', $html.$html2b.$html3, $border=1, $ln=1, $fill=0, $reseth=false, $align='C', $autopadding=true);
$pdf->Output($_SERVER['DOCUMENT_ROOT'] . 'Site/labels/label'.$id.'.pdf', 'FI');
1st of all it prints the contents fine from the database in A4 size etc but all i want is to create and save the pdf document in the label size width:57mm and height:32mm!!! https://i.stack.imgur.com/kQ8Be.png
as you see, I've marked with 1-5 numbers the actual data and the rest are marked with questionmarks!! I dont understand why of course.
2nd when i change the line $pdf->AddPage('L', array(57,32)); to $pdf->AddPage('L', array(57,57)); the label is created but i have an empty space in the bottom-right corner + it doesnt have the 32x57 size!!! https://i.stack.imgur.com/XgEWU.png
thanks in advance!!!
it seems that i had missconfigured my TCPDF library...
the simple solution that i came up was to put this line
$pdf->SetAutoPageBreak(true, 0);
after this
$pdf->SetFont('dejavusans');
and the result was perfect!!!
https://i.stack.imgur.com/hGwyR.png <-perfectly configured label
https://i.stack.imgur.com/khs9v.png <-wrongly configured label
but in my case it perfect for the job!!! all i want is to preview the result before saving (i mean saving the wrong configuration and then update the base until the configuration is good!!)
I know TinyDB can't store images but you can store the image file path. I have done that and I want to make my application display an image when a button is clicked. I have successfully added the file path to the database and I have tested the output using print and the file path displays (so it is working to that extent). Also no error message come up. The function is as follows:
def showcar():
getcar = cardb.get(where("img_id") == "1")
img = Image.open("{car_img}".format(**getcar))
pic = ImageTk.PhotoImage(img)
lblimage.configure(image=pic)
When I click the button the function is assigned to, nothing happens. But when I use the exact same code out of the function like so:
getcar = cardb.get(where("img_id") == "1")
img = Image.open("{car_img}".format(**getcar))
pic = ImageTk.PhotoImage(img)
btnshow = Button(root, text="Show All", command=lambda: lblimage.configure(image=pic))
Then the image displays when the button is clicked. How can I make the application call the image path from TinyDB in a function?
I am trying to display Image in page which is Uploaded in the form.In the page first I fetched the ID of the Record and based on the Record I want to display the Image
I have used this code
<img src='https://creatorexport.zoho.com/DownloadFile.do?filepath=/<%=rec.FileUpload%>&sharedBy=userName&appLinkName=app1&viewLinkName=view1'>
//style
but It is not displaying the Image. Can anyone please let me know where I have to change so that it displays Image?
To display a Image in page view
First, be sure that field type is File Upload not the Image field.
Add Formula filed and add the below expression:
("http://creatorexport.zoho.com/DownloadFile.do?filepath=/" + <Your Field Name> + "&sharedBy=" + zoho.adminuser) + "&appLinkName="+Zoho.Appname+&viewLinkName=<your report name>"
In page fetch Id of record.
<% Variable = Form Name [ID == IdFieldName];%>
sample is
<%r = Add_Event [ID == input.EventID.toLong()];%>
With respect to Id get Image field
<img src=<%=r.Formula%>>
Now Image displays in the page.
I'm trying to theme one of my content types, which has images uploaded to each instance using the image attach module.
Using the developer module, I've found the iids value of the uploaded image (eg 305), but i'm having trouble finding out how I can actually display the image in my code. This line outputs the node id of the image which has been uploaded, but how can I then use that?
$image = $node->iids[0];
I've tried using hook_image, but I can't seem to get that working...
Thanks for any help.
This did the trick...
$nodeid = $node->nid;
$get_image = db_query('
SELECT p.filepath as imagefilename
FROM {image_attach} i
LEFT JOIN {image} a ON i.iid = a.nid
LEFT JOIN {files} p ON a.fid = p.fid
WHERE i.nid = %d AND p.filename = "recipe_thumb"', $nodeid);
$obj_image = db_fetch_object($get_image);
$imagefilename = $obj_image->imagefilename;
Joomla Question: Is there a way to have a different image in intro text? I plan to place a different and smaller image in the introtext.
Could one not duplicate the the opening paragraph/content above the [Read More] line, except with whatever changes are needed? Then, in the article's Advanced Parameters, set the [Intro Text] value to "Hide" so the intro doesn't appear when the article is displayed normally?
look here:
http://www.theartofjoomla.com/home/5-commentary/81-joomlas-hidden-feature-hiding-intro-text.html
I added these code and it works well in my case
<?php
$text = $article->introtext;
if(preg_match('/<\s*img[^>]+>/Ui', $text, $matches)){
$image=$matches[0];
$text = str_replace($image,'',$text);
}
if ($matches) {
$image = str_replace('img src="','img width="100px" src="',$image);
$image = str_replace("caption","", $image);
echo '' . $image . '';
}
else {echo '<img width="100px" src="/images/defaultarticleimage.jpg"
class="defaultArticleImage" />';}
?>
add to the file components/com-contents/view/category/tmpl/default_articles.php (copy this file to your template first)
It's not possible with the current Joomla code.
The intro text is used to display a brief intro the article (usually on the main page) and then once the user opens the article, the intro text is displayed at the top before the rest of the text