On Prestashop 1.7.5, when I save a product page, it take more than 1 minute which it's a bit long.
I try with a fresh install of PS, and the saving is very fast.
So I guess it's because a module link to the hook.
Which hook is call when we click on "save" button in the product page?
Is it only "actionProductSave"?
Here are the hooks that could intervene, knowing that the last 4 are the most commonly used:
actionAdminProductsControllerCoreSaveAfter
actionAdminProductsControllerSaveAfter
actionObjectProductAddAfter
actionObjectProductDeleteAfter
actionObjectProductUpdateAfter
actionObjectUpdateAfter
actionProductAdd
actionProductDelete
actionProductSave
actionProductUpdate
Regards
Related
I have page A and with a button, I go to page B
Now I want to close page B and "page A" appear
(But I don't want to call her again, since the page To make assessments if there is internet, ping the Server, etc. and I don't want to make these checks again.
That is why I want page A to appear once I have closed page B
(As if it were a kind of PopUp (But I don't want to use PopUp because of the type of page and data on page B)
Thank you.
If you go to PageB from PageA with:
NavigationService.NavigateAsync("PageB");
Then you can go back with :
NavigationService.GoBackAsync();
If you go to PageB from PageA with Model style(like PopUp as you mentioned in the question):
NavigationService.NavigateAsync("PageB", useModalNavigation: true);
You can use below codes to go back:
NavigationService.GoBackAsync(useModalNavigation: true);
But I don't want to call her again
To achieve that, you can make the button in Page1 not visible after Page1 appear again.
How to scrape all reviews from walmart review page (ex:http://www.walmart.com/ip/Ematic-9-Dual-Screen-Portable-DVD-Player-with-Dual-DVD-Players-ED929D/28806789) if they are on different pages?I scrape by mechanize(nokogiri) but it can't click on button(it is not part of form,then I can't submit it)
<button class="paginator-btn paginator-btn-next"><span
class="visuallyhidden">Next Page</span></button>
and I can't go to next page.How to solve this problem?
Updated answer (post question edit):
I think it may be easier than that. If you pay attention to the product url, you see that there is some kind of ID at the end of the url:
http://www.walmart.com/ip/Ematic-9-Dual-Screen-Portable-DVD-Player-with-Dual-DVD-Players-ED929D/28806789
If you get that ID, you could take the reviews root page (https://www.walmart.com/reviews/product/) and concat the ID of the product:
https://www.walmart.com/reviews/product/28806789
Now, you can iterate over the products, take the trailing ID, and go to each reviews page to get all the reviews.
Hope it helped.
Old answer (pre question edit):
The page you posted is empty for me. However, what I see is that the element is a button, therefore, what you need to do is look for the form and then submit it.
Example taken from Clicking a button with Ruby mechanize (in case the link stops working for some reason):
# get the form
form = agent.page.form_with(:name => "my-form")
# get the button you want from the form
button = form.button_with(:value => "Search")
# submit the form using that button
agent.submit(form, button)
Credit to #flaviu and #serabe from the question stated.
To do the scraping, you should save the root url and go to the review pages, get the reviews, go back to the root url, and so on.
I solve this task with watir gem.Mechanize cant interact with JavaScript.
I have a page that displays a list of customers. When the user adds a new customer, say "Susy", I have a ajax call that adds Susy into the database and then AjaxOnSuccess will add Susy to the DOM( with out refreshing the page ).
The problem I'm having is when the user navigates away from the page and then hits the back button Susy never appears... In order to get Susy to appear the userr needs to refresh the page.
Is there a way to fix this or am I out of luck?
Thanks
You will want to add new entries to window.history. Over at developer.mozilla.org is an interesting article on how to manipulate the window.history object.
history.pushState(stateObj, "page 2", "bar.html");
... is what you are looking for.
should input buttons that submit ajax requests be disabled after a request is made untl the response is received.
Im thinking specifically adding products to a shopping basket using a button.
Im trying to make the process as bullit proof as possible but a quite new to using ajax so dont know the best practices on these situations.
Yes, I think that is a great practice. But, it would also help to give the user a "processing" (or some other phrase) notice while you've disabled the button.
Disabling input is a very useful UI element to prevent the user from doing something bad, but I would caution against relying on it too much.
You should probably also do some server side checking to make sure you aren't receiving a duplicate request. This will shield you from browser bugs/non js-browsers etc.
If you want to make it as bullet proof as possible, then you need to show an animation right before you kick off the AJAX request, and handle both success and failure of that request.
As far as preventing an additional request, that depends on your specific action. In your case, updating a cart, it could go both ways. If I "click to add item to cart" once, but there are other items on the page that I could also add to my cart, let me click on the other "Add to Cart" button...right?
I've been reading a lot about this problem but I get nothing that suggests a way out.
I am working with version 1.3.2.4 and after creating a bundle product, Magento displays it as price as zero, but gives the "current composition" as the correct value.
alt text http://www.balexandre.com/temp/2009-10-13_2158.png
I already tried to refresh the cache, rebuild the catalog index, and nothing works...
Then I went deep and navigated into the price.phtml template under
template/bundle/catalog/product/view/
and tried to invoke the same method that is showing correctly the value, bu that as well, return zero.
I did notice that Magento has this javascript method
bundle.reloadPrice();
right after and if invoked I do get the correct price... I can try, using jQuery (or Prototype as Magento uses by default) change the value, but I was trying to this right...
Any other ideas?
Had the same problem.
price showed as 0.00.
you have to edit your price-attribute -> show in product-listing: yes
for the product page I'm using this as a work around:
executing this jQuery code:
// hide "Price as configured" text
jQuery(".price-as-configured span:first").hide();
// hide the 0,00 price
jQuery(".price-box-bundle").hide();
// hide the 2nd price (not in image)
jQuery(".product-options-bottom .price-box").hide();
will pass this:
alt text http://www.balexandre.com/temp/2009-10-13_2338.png
into this:
alt text http://www.balexandre.com/temp/2009-10-13_2339.png
In the product grid list I'm using this code to hide the price/button and add to wish list links
// GRID
jQuery("#products-grid-table .price-box").hide();
jQuery("#products-grid-table .button").hide();
jQuery("#products-grid-table .add-to-links").hide();
// LIST
jQuery("#products-list .price-box").hide();
jQuery("#products-list .button").hide();
jQuery("#products-list .add-to-links").hide();
and it will pass this
alt text http://www.balexandre.com/temp/2009-10-14_0005.png
into this
alt text http://www.balexandre.com/temp/2009-10-14_0006.png
I hope it helps someone ...
you can use my magento module: https://github.com/head82/KH_ExtendedBundlePrice tested with magento 1.7