I'm trying to put first the parent/variable product before all the child/variation product in archive product widget of Elementor.
The options in this widget is only show result count and sort by name and price.
https://prnt.sc/KdMxdELi98k2
I tried to prepend the variable products to product so it will show first but the problem is the following pages with parent/variable product are still there because they are not loaded in DOM.
jQuery('.product-type-variable').prependTo('.products');
1st page: https://prnt.sc/FeqToSgxTJ5b
3rd page which I want to display this on first page: https://prnt.sc/EQG3i3J4VEvM
Anyone of you know how to modify the query of archive product widget of Elementor.
Related
Is there a way to programmatically change the collection of a gallery in wix. I have a wix store and I want to add costume filter options. I know you can add some in the editor but if the collection is empty I cant add it to the filter options and I don't want to have to go through the editor and add that filter every time I get an inventory of that product. So I want to use radio buttons and write my own filter code and if the collection is empty I want to display that or show some type of message. I have the coded filter successfully running a query to find all products that contain a certain "String". I want to take that array of products and populate a store-gridGallery programmatically but I don't see any properties of the gridGallery that allow me to do this. Any Suggestions??
You can replace the store grid gallery with a repeater, creating your own store product gallery. Then, using Wix Code inputs and wix-data filter, you can code your own set of filters.
e.g.
Assume you are using a dataset connected to a repeater to show the store products as a gallery. You can then set the dataset filter using
import wixData from 'wix-data';
export function filterElement_onChange(event) {
let value = $w('#filterElement').value;
$w('#dataset1').setFilter(wixData.filter().eq('a field', value));
}
I am developing a Shopify app that need to retrieve current product tags which is ordered/purchased on thank you page. I can retrieve
line_items
but
line_items
don't have product tags so is there any solution to retrieve the product tags for the current product that is orders. I want to trigger a console function along with product tags.
Any solution via Ajax call or etc?
Any solution?
You would want to make a GET request for that product, at which point you can retrieve the tags for it.
GET /admin/products/#{id}.json?fields=tags
Via JS on the frontend, you can just query product-handle.js
Example:
jQuery.getJSON('/products/a-b-c-d-e.js', function(product) {
console.log('The tags for this product are ' + product.tags);
} );
Result:
The tags for this product are test1,test2
So i have a college project in which i am supposed to create movie library.So my main page has many different movies.If i click on any movie poster,it will take me to the a page which will show information of the movie poster i clicked.So my main aim to to create a basic template for movie information like movie director,movie rating,movie actor etc which will change according to the movie poster clicked.All these data will be stored in database.If someone can point me to the right direction,it would be cool!
IF you choose to work with PHP
I believe that in your case, when the user click the movie info button you'll have to pass an identificator (id_movie or something) via GET or POST. That way you will need one page for displaying the information and populate the description of that movie accordingly to that especific movie ID.
More info on passing variables between pages in php is avaliable here
Put hyper links to each of the movie posters and pass identifying variables like
<a href='phpfile.php?movie=movie1' title='movie name'><img src='movieposterimg.jpg' alt='movie name' width='100' height='100'></a>
and in phpfile.php (template) use
$moviename=$_GET['movie'];
Then pull data from database for that movie.
In the product page I want to create a special div that display itselft with Jquery, in that page the client will find different options that he could add like an accesory, the question is: How I can add a specific price adding up : base price + specific price + combination price.
I was trying to modify product.js but it didn't change anything, I'm not expert in prestashop core, Then as many information you could let me will be very gratefull.
Thank you.
On the product page there are various JS variable for price and combinations are already there.
So you can simply create a module with a hook (hookDisplayLeftColumnProduct, hookDisplayRightColumnProduct etc.) on product page to render your JS code on the product page and through that code you can achieve what you want (also using the price JS variables on product page).
public function hookDisplayLeftColumnProduct()
{
// Render Your tpl here
}
In a jsp, I have generated a table consisting of records from the database - trivially, using
<c:forEach var="activity" items="activities" varStatus="loopCounter">
...<td><c:out...
</c:forEach>
This is shown in a modal. When the user selects one from the items and clicks 'OK', I want the selected item to load it's details in the description div on the same page.
<dl>
<dt>Title</dt>
<dd>{Title of selected item here}</dd>
....
</dl>
An approach I think of is to get the selected item's id and load it from the database, then display - although it'll be superfluous, since the record is already loaded. I am using Spring to return the list.
#RequestMapping(method = RequestMethod.GET)
public String index(Model model){
List<Activity> activities = activityService.listActivities();
model.addAttribute("activities", activities);
return "index";
}
Not all columns are displayed in the modal table, so using javascript to "set text" from modal to desc div is not a solution (I think).
Any ideas on how can I display the details from the list without requesting it again from the database?
Or more importantly, is there a better approach in achieving my requirement?
How about loading the description in your JSP directly in hidden divs (display:none;) and then make it visible (dispaly:block;) on user action via only JavaScript, so you don't need to make another request to the server to load the data again from the database