Shortcode selector only works after adding at least one product to cart
-
I have tried this on the catalog pages and on product pages. It may have something to do with the way I am testing the shortcode as this is for initial testing and simple proof of concept.
ISSUE:
Selecting a new currency from the shortcode widget (in the header) appears to set the Cookie as expected, and then proceeds to refresh the page with location.reload().
However when the page refreshes, the correct currency is not selected in the widget dropdown. No prices are converted. Cookie still shows correct currency.
HOW AM I WORKING AROUND IT?
To work around the issue, I noticed that as soon as I add just one product to the cart, then the currency selector dropdown starts to show me the correct selection. In that case, the selectors starts to work on Catalog and Product pages as expected.
SETTINGS:
Visual Only: FALSE
Use IP: FALSE
CURRENCY IN PROFILE: TRUETesting via header.php Theme file:
<div class="top-navigation-right"> <?php echo do_shortcode('[br_currency_exchange]'); ?>
Am I missing something? Should I place the shortcode wdiget in some other location to make it work on first page load?
- The topic ‘Shortcode selector only works after adding at least one product to cart’ is closed to new replies.