Prestahop one page checkout javascript - javascript

I use one page checkout option on my theme form prestashop.
While customizing I must have eliminated some id's so now on the cart page do when changing the quantity to zero while having one item in the basket, the effect doesn't work properly.
Normally when changing the quantity to 0 the row of the product disappears when changing the quantity to zero on the only element the whole form with userinfo + transport option and payment should be removed and left with a "cart is empty" text while I have the text the rest stays on the page.
I'e tried to search in the javascript code but could not find anything.
the page is abcmoto.pl you can add a item and go to the checkout process to see what i mean.

Related

Select All checkbox is not working when I go to second page of a classic report in Oracle APEX

I have a page having a classic report in an Oracle APEX application. The first column of each row is a checkbox. Also, I have added a checkbox in the first column of headers row. The purpose of this checkbox is to provide Select-All, Unselect-All functionality so that when I select the header checkbox, the checkboxes in all rows get selected, and when I unselect it, the checkboxes get unselected. Here is JQuery code that I use on the "change" event of the header row's checkbox:
if ( $( '#selectunselectall' ).is(':checked') )
{
$('input[type=checkbox][name=f01]').attr('checked',true)
}
else
{
$('input[type=checkbox][name=f01]').attr('checked',false)
}
The problem is that this functionality is working only for the first page, and only when it is first loaded. If I go to next page, this functionality no longer works, and also if I come back to first page, that functionality doesn't work even on first page.
Another problem is that when I select some individual checkboxes on first page, and then go to next page, and then come back first page, all the checboxes again come as unselected. It means the application doesn't remember user's selecttions when the user navigate out of page.
Can someone please help resolve these issues?
Try the following steps:
InteractiveReport - Columns - "Select" - Heading - "<"input type="checkbox" id="selectunselectall" onclick="$f_CheckFirstColumn(this)"">"
InteractiveReport - Attributes - Heqading - Fixed To - "None"

Select value from second dropdown menu

I'm trying to make a script and run it using Tampermonkey. Website belongs to a Visa Application Center in Morocco (https://morocco.blsspainvisa.com/book_appointment.php).
Once I open the webpage, I get a popup. Code is made to close it. Then when I choose the city: Tangier, I get another popup. Then I select the category: Normal, phone number and email address.
document.querySelector("#IDBodyPanelapp > div.popup-appCloseIcon").click();
document.getElementById('centre').value="8#3";
document.querySelector("#IDBodyPanelapp > div.popupDivCenter").click();
document.getElementById('category').value="Normal";
document.getElementById('phone').value="60000000";
document.getElementById('email').value="email#gmail.com";
I need to automate this process with prefilled values. I've done that but the only problem is that when I use the above code, the Category dropdown menu remains empty. It seems that the values don't get loaded in order to select one.

Issue - How to reset pager back to page 1 in Angulas js pagination-control?

I've been working with the pagination directive. By basic setup is a single page which allows the user to enter search criteria and then click search to see the results. The results are displayed on the same page, below the search input fields. The pagination is working great, but let's say the user goes to page 3 and then decides to do a new search. The user changes the search criteria, clicks search again but the pagination controller is never reset to 1...item 3 is still highlighted.
What is the proper way to reset the pagination control back to page 1?
<dir-pagination-controls boundary-links="true" on-page-change="pageChangeHandler(newPageNumber)"></dir-pagination-controls>
Use $scope.$watch. Just watch the page number by $scope.$watch or when user change search criteria and click search just reset pagenumber = 1 .

jquery back button to previous category in sortable gallery

I have a jquery portfolio gallery with 4 categories which are sortable. When you click on a category the portfolio is rearranged on the same page through jquery showing only those project in that category. Upon clicking a specific project the user can then see the project page/details. I want to add a back button on this page so that when a user is viweing a project they can return to category they were at before.
I tired the following which creates the back button but it take me back to the main portfolio page, not the category which I was browsing before.
function goBack() {
window.history.back();
}
This is one of the gallery page just in case: http://goo.gl/JeSNjD
Not knowing any of your application's code, this is a bit of a shot in the dark but I think I know what you're probably missing.
Using the history.back() will take you to the last page you visited (a page visit is only recorded if the URL is updated). If you are updating content in your website with jQuery and not loading a new page, your browser's history doesn't record this so back takes you back to the top page still.
What you will need to do is change your back button code to hide the current project, and redisplay the category page. You cannot use history.back().
Edit:
If you need more data to correctly rebuild the previous page, you can either change the url for the category page (not necessarily simple to implement but perhaps the most robust thing to do), or to store information about what page they came from. If you are using cookies, you could save navigation there, but you could also add a ref value to the query string when you navigate to a project page.
Category page:
Link to project
Project page:
Back button
Then use that information to reopen or resort your categories.
One problem is knowing which category a back button should return to.
For example, /portfolio/foothill-pasadena-2 should route back to the office category and /portfolio/131house should route back to the Residential category. If I emailed you a link to one of those and you clicked it to go straight to the project page, should there be a back button on the page when you go to it and would it take you back to all categories or to the category related to the project?
One thing you could do is to change your permalink structure to include the category, such as /portfolio/office/foothill-pasadena-2 and /portfolio/residential/131house. Then your could hard-code your back button to go to /projects. You have some jquery running there (wp-content/themes/yourtheme/js/jquery.custom.js):
var isotopeContainer = jQuery('.portfolio-wrapper, .gallery-wrapper'),
isotopeFilter = jQuery('#filter'),
isotopeLink = isotopeFilter.find('a');
isotopeContainer.isotope({
itemSelector : '.isotope-item',
layoutMode : 'fitRows',
filter : '.food-service'
});
isotopeLink.click(function () {
var selector = jQuery(this).attr('data-category');
isotopeContainer.isotope({
filter : '.' + selector,
itemSelector : '.isotope-item',
layoutMode : 'fitRows',
animationEngine : 'best-available'
});
isotopeLink.removeClass('active');
jQuery(this).addClass('active');
return false;
});
That is finding the four category links inside your filter div and adding a click function.
Maybe you can add some extra code that would get the document.referrer, checks it for a match against yoursite.com/new/projects/{category}/{project}, and pulls out the value of {category}. If the category matches one of your four values (food-service, office, residential, other), then call the click function on that element.

Confimration not appearing when it should do

A confirmation is not bing displaye after all validation has passed, instead it is showing a validation message stating no students have been selected to add even though I have done this. How can I get the confirmation to be displayed?
Here is an application you can use to see and use for yourself:APPLICATION
Select a course from drop down menu
In Avialable Students to Enrol box you will see list of students. Select a student and click on the Add button underneath and you will see that student added into the box underneath.
Click on the Submit Students button at the bottom and it displays the validation message saying you have no selected a student to add to course, but you have done this so the confirmation should appear. This is the problem
The jsfiddle showing the whole code for this is here:
http://jsfiddle.net/PhWbm/3/
You are checking for children of an element with the ID courseadd while the ID you should be looking at is studentadd. Try changing either the ID of the select or the selector.

Categories