dingdang
Forum Replies Created
-
Forum: Plugins
In reply to: [Hotel Booking Lite] Currency SupportOK can you suggest how to implement it? Do you have anywhere a filter for the values that appear at the site? We managed to filter only the “total” as you have a filter, but not the others (displayed during the browsing). Please point me to the right function where you extract the values and pass them to the JS script that you use to fill the HTML, so we can edit your code ourselves. Thank you
Forum: Plugins
In reply to: [WooCommerce] Display Amazon Pay as a normal payment gateway?I already created the plugin will upload it soon.
Forum: Plugins
In reply to: [WooCommerce] Display Amazon Pay as a normal payment gateway?OK, I’ve got it to work as I want at the end without touching the original plugin here is the recipe:
– using your way to move the .wc-amazon-checkout-message but only in case the user is not logged in amazon (this is where the button is active otherwise this section has a message to log out which is OK to be on the top)
– I’ve created a dummy gateway plugin just to have a section there and an option, here is an example base: https://github.com/bekarice/woocommerce-gateway-offline/blob/master/woocommerce-gateway-offline.php
– I move the .wc-amazon-checkout-message section inside this new gateway BUT here is the important part:
$( document.body ).on( ‘updated_checkout’, function() {
.. insert the JS code here
});
(thanks to stripe plugin for that). This guarantees that the insert will happen only after woo finishes his work creating the options section.– to be perfect, when amazon option (of the dummy plugin) is selected, I change the text of the “Place order” button to “Login to amazon” and onclick – a click to the amazonpay button is invoked (to go perform a login) – this is to prevent the order to be submitted trough the dummy gateway.
Works perfectly that way.
1. I suggest the author of the plugin to read this and to do it as a checkbox option.
2. Another option is needed to hide the button in the cart page (they have an option to hide the original button, but not the amazon’s button)
- This reply was modified 5 years, 6 months ago by dingdang.
Forum: Plugins
In reply to: [WooCommerce] Display Amazon Pay as a normal payment gateway?OK, I tried it and it is not possible.
I’ve created a plugin with a new dummy payment gateway, just to have it in place and to move the amazonpay code there. BUT if something inside .woocommerce-checkout-payment is changed on the fly, woocommerce recreates the whole .woocommerce-checkout-payment, and so the inserted code disappears again.
This should be done only inside the original plugin.
The only workaround is yours, just to move the section on top of the .woocommerce-checkout-payment (and not inside it).
Forum: Plugins
In reply to: [WooCommerce] Display Amazon Pay as a normal payment gateway?Thanks. I made it a little more complicated (move that only if it is not logged in amazon so in case it is, the message “You’re logged in with your Amazon Account. Log out ?” stays on top which is better).
Ideally the plugin author should add this as an option.
I’m not sure if I move it further (and create it trough JS as a radio button option) would mess woocommerce somehow.Forum: Plugins
In reply to: [Yoast SEO] Domain alias XML sitemap problemSecond problem: when the option “Enable the XML sitemaps that Yoast SEO generates.” is switched off, anyway the sitemap_index.xml is available (including all sub-xmls).
Forum: Plugins
In reply to: [W3 Total Cache] BUG: JavaScript error on admin pageThe error message appear in the console. I will try to replicate it again.
Forum: Plugins
In reply to: [W3 Total Cache] BUG: JavaScript error on admin pageFirst note – while trying to replicate it I found that this happens on a very specific situation:
a) let say I add a new plugin, and I am still on the main “Plugins” page, the button appears after the activation “empty the page cache” and it WORKS if clicked
b) then to get the problem case – I don’t click on the above button but instead I go to the page “Updates”. At that page the button “empty the page cache” is not present. Then I click from the top admin bar on “Purge all caches”. After that while on the same page (“Updates”) the button “empty the page cache” reappears (which is also strange – it should be there in the beginning and disappear if I click on the “Purge all caches” but the reverse actually happens). And now if I click on that button I get the specified error message in the console.
Here are the button and the error as you requested:
https://i.ibb.co/Rh5wW9R/ice-screenshot-20181228-003609.png
https://i.ibb.co/ssMr2B8/ice-screenshot-20181228-003644.pngAnyone on this bug?
Forum: Plugins
In reply to: [Polylang] Alternate image for different languageThank you for your reply. However If the image has text in some context it is required to have different versions for the different languages.
I actually solved my problem a little hacky – I replaced the image associated with the media for the other language. This can be done either manually or using a plugin (there is one free in the repository – “Replace Image” which does that fine), which means this could be handled by your plugin directly as well as an option.Forum: Plugins
In reply to: [Polylang] Alternate image for different language@codestylist I don’t see any way to link two images. Suppose I upload two of them and mark one as language1 and the other as language2, how one can link two of these?
Forum: Fixing WordPress
In reply to: Side by side images issue@gdsilva actually you can do it w/o any code it can be done trough the editor with your mouse but it’s a little tricky (to have 3 images side by side all centered), I’ll describe it from scratch (suppose you have a new page)
1. Click “Add media”, add the 3 images. By default they don’t have an alignment (when you click an image in the page editor, some icons appear and the 4th is “No alignment” and it is selected by defaul). If you would like to correct your page not starting from the beginning, just make sure you change the alignment icon for the 3 images to “No alignment”.
2. The secret (w/o this you can’t get the wanted result) – add some random text before the 3 images AND after them, you can add a single letter “a”.
3. Mark (select) everything with the mouse (the text at both sited and the 3 images) and click the text center icon in the icon bar in the editor tab (or press Shift+Alt+C). If you didn’t add some text this action would center the images (their align icons would change to “Align center” instead the default), something that is not wanted. BUT with the trick above, the text and images will get centered in a single line.
4. Now fix back the trick – just remove the text in the beginning and the end. As a result you will have the 3 images side by side and at the same time centered as a whole.
Note that this will result in a responsive layout – if you shrink the screen and there isn’t enough space the images will split and go to the next line if needed still centered.
Because my messages disappeared for a week, I ping the author about this problem again.
Forum: Plugins
In reply to: [W3 Total Cache] TTL setupThanks,
I don’t see such an option. There are several “Expires header lifetime” but I don’t think this is what I’m looking for (the header value can be one, the internal cleaning of cactehd files can be other).“and display that data (Fields) thru shortcodes.”
Where is the doc about the shortcodes?