
-
AuthorPosts
-
November 2, 2017 at 3:02 pm #871695
Hi,
I would like to use the shopping cart icon that appears in the mobile version of the web to link it to the shop page directly.
In our shop there is no sense to shop more than one product as we sell appointments, therefore it would be useful to send them to the shop itself.Is it possible? Do we have to hide that icon and create a new floating button linked to the shop page?
Thanks in advance,
Dani.November 4, 2017 at 11:04 pm #872627Hey daniandres,
Try adding this code to the end of your functions.php file in Appearance > Editor:function change_checkout_url( $url ){ // Force SSL if needed $scheme = ( is_ssl() || 'yes' === get_option( 'woocommerce_force_ssl_checkout' ) ) ? 'https' : 'http'; $url = site_url( '/custom-page/', $scheme ); return $url; } add_filter( 'woocommerce_get_checkout_url', 'change_checkout_url', 10, 2 );
change /custom-page/ to your page
Best regards,
MikeNovember 5, 2017 at 11:05 am #872720Hi Mike,
I tried to add your function to our functions.php but the web refuses to load.
By the other hand I’ve thought that we are using WMPL to make a multilingual site and it would be more difficult to redirect this button
according to the actual language.Perhaps it’s easier to hide the mobile cart button and then adding a floating button for each language home page.
What do you think?Thanks.
November 5, 2017 at 6:52 pm #872789Hi,
Ok, how about adding a custom menu at the top of your page?
Go to Enfold Theme Options > Header > Extra Elements > Header Secondary Menu and activate, then go to your menus and create a new menu, you can name it anything.
Add two custom menu items, set the URL to your pages, in the Navigation Label add this code, one for each link:Tienda <img title="Español" src="https://[your-url].com/wp-content/plugins/sitepress-multilingual-cms/res/flags/es.png"> Shop <img title="English" src="https://[your-url].com/wp-content/plugins/sitepress-multilingual-cms/res/flags/en.png">
Save menu and set it in the Manage Locations tab
To hide the menu on any screen larger than a phone add this code in the General Styling > Quick CSS field:@media only screen and (min-width: 767px) { .av_extra_header_active {display:none!important;}}
Best regards,
Mike -
AuthorPosts
- You must be logged in to reply to this topic.