Please forgive this totally newb question. I'm not a dev, and I'm a little too far that I can deal with right now...
I'd like to add a link to the WooCommerce cart page using the cart icon from my menu located at: http://gimp4.devcaneve.ca. I have a friend who coded the php function and I believe I just have to add it in the functions.php
file of my child theme. Here is the code of the function :
// cart display function
function directByLang()
{
$current_lang = apply_filters('wpml_current_language', NULL);
if ($current_lang == 'en') {
// English link
echo '<a href="/en/cart/">English Cart</a>';
} elseif ($current_lang == 'fr') {
// French link
echo '<a href="/panier/">French Panier</a>';
} else {
// Default to French if language is not determined
echo '<a href="/panier/">French Panier</a>';
}
}
Now first of all neither my friend nor I know if this function is properly coded because my friend never worked with WP... And I'm no dev...
On my home page, there is a shopping cart icon with a red bubble with the number of items in the cart. When this is clicked, it opens a popup cart that I want to hide. I was able to hide this ugly popup with css using display: none;
But I would like that the cart icon could direct the users to either the French cart (/panier/) or the English cart (/en/cart/) onclick on the icon, depending on the language selected by the users when they entered the site.
I'm pretty sure this has something to do with css but honestly I'm overwhelmed, as I have a very steep learning curve ahead of me.
I know I'm asking a lot, and any help will be appreciated. I gotta start somewhere, if I want to learn these things one day... Thanks.