I need to display related product carousel in my sidebar - carousel

I have added the code remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_related_products',20); and add inside the text editor the shortcode [related_products per_page="3" columns="1"], but it is displaying unproperly. Is there is any solution
Displaying Like this:
https://im4.ezgif.com/tmp/ezgif-4-233a5a5d74.webp
Does anybody have the solution??

Related

Grayed out products that are not available

I would like products that are not available on the listings to be displayed in a different color. Ideally, they would be gray or transparent to stand out from those available. How can I achieve this?
https://medpak.com.pl/suplementy-diety/
First of all, if product is not available then it wouldn't be show on the listing unless you set in prestashop panel that you allow to order unavailable products - but why then make them look different if I can still order them?
Anyway, to achieve your target:
Find inside your product-list.tpl line where is code for single product, and to the value of class for element product-container add a little code below to make it look like this:
<div class="product-container {if $product.quantity <= 0}product-grayed{/if}">...</div>
Then in your css add:
.product-grayed img {
opacity: 0.5; // this code for transparent image
filter: grayscale(100%); // this code for gray image
}
Make any other css changes using added class product-grayed

React Native - Position child view above parent's view sibling

I build a textinput like facebook's mentions. After typing # you get a list with different hashtags. I have two of them on one site, one for the title and one for the text.
The problem is, that the hashtag-list from the title is displayed below the text of the content. See Screenshot for that:
The list of hashtags is behind the lorem ipsum content
I tried using the zIndex but it does not have any effect here.
The hierachie is as follows:
View:
-- MentionsText Title
--- #List for Title
-- MentionsText Content
--- #List for Content
As you can see, the content is below the title in the hierachy. That positions it correctly on the screen, but displayes itself above the list of the title. Is there any way of accomplishing it with a smooth solution?
Try wrapping your blocs into views independently, don't use absolute position.
Btw if your list can grow without limit you may need a ScrollView or FlatList.
I found a solution that contains wrapping both textinput in one view, changing the order (content first, then title) and then setting flexDirection of the view to 'column-reverse'. That way the title is again on top and the z-index is now correctly set too. Just doesnt seem very nice, maybe someone got a tip to improve it. The code is the following (note that the MentionsTextInput contains the List as a child):
<View style={{flexDirection:'column-reverse'}}> //The newly added view
<MentionsTextInput //The content of the page
style={styles.inputContent}
placeholder={I18n.t("descriptionInput")}
value={this.state.description}/>
<MentionsTextInput //The title
style={styles.inputTitle}
placeholder={I18n.t("noteTitle")}
value={this.state.title}/>
</View>

How to change header template in extjs 4 grid panel

I want to change default header template of grid. I do not know what config or property to set. I tried "renderTpl" , "tpl" , "metaRowTpl" but these property related to row in grid, where i want to change header.
Any example or link would be great.
Like above image, I want extra header/row/column-header in between where text will come from database (and basically it is filter information).
You change the header text with the following command
yourGrid.getView().getHeaderAtIndex(columnIndex).setText('Header Text');
http://jsfiddle.net/alexrom7/YNTuN/3/

How to specify page size in dynamically in yii view?

How to specify page size in dynamically in yii view?(not a grid view)
In my custom view page there is a search option to find list of users between 2 date
i need 2 know how to specify the page size dynamically? If number of rows less than 10 how to hide pagination ?
please check screen-shoot
I dont want the page navigation after search it confusing users..
my controller code
$criteria=new CDbCriteria();
$count=CustomerPayments::model()->count($criteria);
$pages=new CPagination($count);
// results per page
$pages->pageSize=10;
$pages->applyLimit($criteria);
$paymnt_details=CustomerPayments::model()->findAll($criteria);
$this->render('renewal',array('paymnt_details'=>$paymnt_details,'report'=>$report,'branch'=>$branch,'model'=>$model,'pages' => $pages,));
}
my view
Link
I'm assuming you want the entire list of search result be shown on a single page, no-matter how long it is?
If so, this is quite easy to achive.
As I can see in your code, you are now defining your pageSize to have a size of 10. You can update it to be dynamically be doing this:
$pages->pageSize = $count;
To remove the pagesizes you can change the css of your view file, but for that we would need your view file to see how you defined it.

Not able to get tooltip text using Selenium WebDriver

I have 5 tooltips in page. Using WebDriver, I am trying to verify these tooltip text.
I am using following code sequentially to get the tooltip text of all 5 elements:
Actions builder = new Actions(WebDriver);
builder.ClickAndHold(Element1).Perform();
Console.WriteLine(Element1ToolTip.text);
builder.ClickAndHold(Element2).Perform();
Console.WriteLine(Element2ToolTip.text);
builder.ClickAndHold(Element3).Perform();
Console.WriteLine(Element3ToolTip.text);
The issue is I get only the tooltip text of first element printed in console.
Is it because I need to refresh or reset the builder?
It's really weird when I delete the code for 1st element , then I can get tooltip text of 2nd element. So, basically it is getting tooltip text only once in single execution.
Verify tool tip by comparing "title" attribute of the web element and your expected tool tip text.
Console.WriteLine(Element1.GetAttribute("title"));
Console.WriteLine(Element2.GetAttribute("title"));
Tool tip text for input elements would be the title attributes and for images, alt attribute would be the tool tip.This is the standard for HTML 4, so I am not sure if you need to do hover and all.
Console.WriteLine(InputElement1.GetAttribute("title"));
Console.WriteLine(ImageElement1.GetAttribute("alt"));
http://www.javascriptkit.com/howto/toolmsg.shtml
I think, it needs to release from element as:
builder.release(Element1).perform();
So, your code could be as below:
Actions builder = new Actions(WebDriver);
builder.ClickAndHold(Element1).Perform();
Console.WriteLine(Element1ToolTip.text);
builder.release(Element1).perform();
builder.ClickAndHold(Element2).Perform();
Console.WriteLine(Element2ToolTip.text);
builder.release(Element2).perform();
builder.ClickAndHold(Element3).Perform();
Console.WriteLine(Element3ToolTip.text);
builder.release(Element3).perform();
I am facing the same issue , i checked the view source page on running the test and it appears that the title attribute is displayed as data-original-title.Due to which it is unable to display the text.On replacing the title with data-original-title . I am able to obtain text.