Product with variants, price in various currency

  • Posts: 164
  • Thank you received: 6
  • Hikashop Business
4 years 9 months ago #320838

-- url of the page with the problem -- : swealth.ch
-- HikaShop version -- : 4.3.0
-- Joomla version -- : 3.9.19
-- PHP version -- : 7.2.18

Good evening

I setup a website with 2 products, one "single" and another with 3 variants.

When I activate the currency switcher, the "single" product has its price updated in the chosen currency. Normal.

But for the product with variants, the price is always displayed in the main currency, the CHF in our case even if I change the currency with the switcher.

Would you have an idea?

Thank you for your help.

Jean-Loup

Product ok: www.swealth.ch/products/cbd-mct-oil

Product with variants: www.swealth.ch/products/cbd-crystal

Please Log in or Create an account to join the conversation.

  • Posts: 83407
  • Thank you received: 13502
  • MODERATOR
4 years 9 months ago #320868

Hi,

I can only think that the issue comes from a view override.
Try to check if you have the folder templates/YOUR_TEMPLAT/html/com_hikashop/product/ via FTP.
If you do, try renaming it temporarily in order to deactivate all the view overrides on the product details page.
Then, check again the product with variants page. Hopefully, you should not see the problem anymore, which indicates that the problem comes from one of the files in that folder. Then, you can repeat the process for each file of the folder to identify which one is causing the problem.

Please Log in or Create an account to join the conversation.

  • Posts: 164
  • Thank you received: 6
  • Hikashop Business
4 years 9 months ago #320880

Hello,

I use Yootheme Pro and have a folder ⁨

/templates⁩/yootheme⁩/html⁩/⁨com_hikashop⁩/checkout (and product) folders but both are empty.

Would you have another idea to point me in the right direction?
Thank you in advance

JL

Please Log in or Create an account to join the conversation.

  • Posts: 83407
  • Thank you received: 13502
  • MODERATOR
4 years 9 months ago #320884

Hi,

Then I don't know. We'll need a backend and a FTP access in order to check the situation deeper.
Could you provide that via our contact form along with a link to this thread ?
www.hikashop.com/support/contact-us.html

Please Log in or Create an account to join the conversation.

  • Posts: 164
  • Thank you received: 6
  • Hikashop Business
4 years 9 months ago #320918

Done Nicolas. Thanks you
NOTE: I sent second mail with joomla backend credentials also

Last edit: 4 years 9 months ago by jean-loup.

Please Log in or Create an account to join the conversation.

  • Posts: 164
  • Thank you received: 6
  • Hikashop Business
4 years 8 months ago #321015

Hello Nicolas, I use Components Anywhere to place the product in a module. It may comes from this?

If I put the product in a joomla wrapper module, the currency conversion works. But there is always a small delay to display the frame... but working, worse case...

Last edit: 4 years 8 months ago by jean-loup.

Please Log in or Create an account to join the conversation.

  • Posts: 164
  • Thank you received: 6
  • Hikashop Business
4 years 8 months ago #321029

I asked regular lab:

Hello, I use component anywhere to put a Hikashop article in a Joomla custom module. But the currencies of the article are not changing on the front end when we use the currency switcher.
If I put the article (same link) in a Joomla wrapper module, it works perfectly. But there is always a small delay in the display of the frame, thus I would prefer Component anywhere!
Would you have any idea why the price of the article doesn't change? Override issues?
Thank you for your help
Jean-Loup

Answer from regular lab:

I would not know. That is something down to how that Hikashop code works. Best to ask them. Maybe it is down to cache or you need to add something to the url.

If it can help... thanks

JL

Please Log in or Create an account to join the conversation.

  • Posts: 83407
  • Thank you received: 13502
  • MODERATOR
4 years 8 months ago #321020

Hi,

Ah yes totally. Components anywhere will call the page of the product from your own server as if he was a user of your website to get the content and replace it on the page. But the current currency is stored in the user session, so changing the URL won't help.
To avoid that issue, it would require that components anywhere also pass the cookies when doing that request of the page to keep the same user session. It would be possible but that would require some coding in components anywhere's plugin as far as I understand. Note however that I'm not familiar with that extension's code. You would have to check with them if something like that would be possible (maybe they even have some solution for that).

Last edit: 4 years 8 months ago by nicolas.

Please Log in or Create an account to join the conversation.

  • Posts: 164
  • Thank you received: 6
  • Hikashop Business
4 years 8 months ago #321055

Just for information, Regular lab made a new version of the plugin

20-Jun-2020 : v4.6.1
^ Updates translations: de-DE, tr-TR
# Fixes issue with "Pass on Cookies" setting not working correctly (switching it off, made no difference)
# Fixes issue with not all cookies being passed along

But still not working.

But I made a reflexion...

I entered 2 products so far, both placed in a module with components anywhere. The product without variants works without any problem, the price is displayed in the correct currency according to the choice made, normal behaviour

But the other product, put also in a module on a same way doesn't work.

The lonely difference i that this product has variants... nothing else.

So without variants it works and not when variants are created...

Please Log in or Create an account to join the conversation.

  • Posts: 83407
  • Thank you received: 13502
  • MODERATOR
4 years 8 months ago #321116

Hi,

I don't see why it would be different between products with and without variants.

I checked on my end and I don't find that version of the plugin:
www.regularlabs.com/extensions/componentsanywhere/changelog
The latest is still the 4.6.0
I actually tried to reproduce the problem and I do have it on my website regardless of whether the product has variants our not.

I do have the "Pass on Cookies" setting activated in the components anywhere plugin, but if I add such code at the beginning of the view file product / show.php (which displays the product details page) via the menu Display>Views:

<?php echo '<pre>';var_dump($_COOKIE);echo '</pre>'; ?>
It displays an empty array when I access the article page with the product:
monosnap.com/file/JihYm2tnrr9lvJmfemlRVujnHHe97W
But If I access the product page directly, I do see the Joomla cookies:
monosnap.com/file/ndRRJhHACx3cYqMjxPQOHjOD4yr7Lu
And some of these are used to maintain the user session.
Without the cookies, it's normal that the selected currency is lost in the area loaded by components anywhere.

Supposing that you have the 4.6.1 of the plugin on your end, you can do that test yourself. That way, you can confirm whether the cookies are there or missing.

Please Log in or Create an account to join the conversation.

  • Posts: 164
  • Thank you received: 6
  • Hikashop Business
4 years 8 months ago #321125

Hello

I get the answer below if I add the code at the beginning of the show file (on my testing environnement). Are the cookies passing through, little bit technical for me.
And I installed the version of component anywhere I find following the link below. It is installed also on the production environment (swealth.ch)
www.regularlabs.com/development-releases

/share/MD0_DATA/Qweb/swealth/templates/yootheme/html/com_hikashop/product/show.php:1:
array (size=22)
'showAllAp' => string 'true' (length=4)
'_ga' => string 'GA1.1.1216830819.1567939393' (length=27)
'qvs_rememberme' => string 'true' (length=4)
'qvs_rememberuser' => string 'admin' (length=5)
'remeber' => string '1' (length=1)
'qvs_remembertoken' => string 'scR7H882mQzMNttsKx3osHBdkWjHwYYG' (length=32)
'csrftoken' => string 'I6IwUlypsd2hS6HEnpuLsakY2PL7niRq' (length=32)
'qtoken_account' => string 'YWRtaW4=' (length=8)
'qtoken' => string '8f0f181cbdf143f5f0e2683b18fab934' (length=32)
'nas_lang' => string 'ENG' (length=3)
'hikashop_switcher_cookie' => string 'display_grid' (length=12)
'_cookieAllowed' => string 'true' (length=4)
'joomla_user_state' => string 'logged_in' (length=9)
'a7ef8e46a8b404bd1667478c48709c33' => string 'shb8cn4j0jnh8evt98o8u5pme5' (length=26)
'eed8290ed58b447cb34edce3219578d2' => string '1jghu4mtbpru2fhdqdkou5po46' (length=26)
'nas_1_u' => string 'YWRtaW4=' (length=8)
'sessionid' => string 'oeuqcazfc6ng518ftugjavrjgiu0heqq' (length=32)
'QT' => string '1592722223970' (length=13)
'_gid' => string 'GA1.1.687205708.1592817963' (length=26)
'fd0f1e5ae595afe83bfde2dc335a4083' => string 'l8870ftc0nkgvpak197h2p7iek' (length=26)
'joomla_remember_me_e4b0775b892ec5adc3410523e0f8a73e' => string 'ppzZsp8ivP4iWEPD.UjodFw1xYN3byq7EGlTw' (length=37)
'9a8c61d43bfaa711772ccf5cb825b572' => string '78ac916fd448678a88224cd0f871413f' (length=32)

Please Log in or Create an account to join the conversation.

  • Posts: 83407
  • Thank you received: 13502
  • MODERATOR
4 years 8 months ago #321133

Hi,

It seems they are. Normally, if you access the hikashop product page for that same product, you should get the same text (as the cookies are supposed to be the same).

I got the new version of the plugin and installed it on my local website and still have the same problem.
However, after I enabled the "Force cURL" setting of the plugin, I was able to get the cookies.
Still, even though I had the cookies, the user session was still not the same and it seems to be lost.
Actually, that issue has been reported before:
www.regularlabs.com/forum/componentsanyw...ctected-in-component
www.regularlabs.com/forum/componentsanyw...la-user-profile-page
However, on my end I already have that setting set to "database" and the user session is still lost when going through Components Anywhere.

I'm afraid I can't do more in that issue as it looks like the issue is with Components Anywhere loosing the current Joomla user session for some reason. I would recommend to check again your issue with Regular Labs.

Please Log in or Create an account to join the conversation.

  • Posts: 164
  • Thank you received: 6
  • Hikashop Business
4 years 8 months ago #321177

OK Nicolas, I will try another approach since it seems not possible to solve this cookies problem... Last answer from regular lab:

Seems the default Joomla method to get url contents does not have the functionality to pass on cookies.
In the Components Anywhere system plugin settings, switch on the "Force cURL" option.



Let's try something else.

If I put tags in a custom module, I have the "choose options" on another page.
Is there any way to get the options on the same display, like on the image on the bottom, which is the result I get with Components anywhere?

With tags, the currencies are ok but I can't get the options on the same page. Do you see a solution?

Thank you, again...

JL

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 83407
  • Thank you received: 13502
  • MODERATOR
4 years 8 months ago #321181

Hi,

I understand what you're trying to do. But the characteristics selector system is only available on the product page.
Doing that elsewhere would require important development, which is why I first recommended to do it with components anywhere.
Now this can be developed but you're looking a several hundred euros of development costs.

Please Log in or Create an account to join the conversation.

  • Posts: 164
  • Thank you received: 6
  • Hikashop Business
4 years 8 months ago #321209

Understood, thank you Nicolas

Please Log in or Create an account to join the conversation.

Time to create page: 0.091 seconds
Powered by Kunena Forum