WebsiteBaker Community Forum
WebsiteBaker Support (2.8.x) => Bakery Shop => Topic started by: svsanchez on November 19, 2012, 09:40:31 PM
-
Hello Community
I would like to add a "MY SHOPPING CART" link and would like to know which URL I should use. I have the shopping cart buttons appearing in my bakery but I need to add a link to the shopping cart contents on each page of the site I am building, even if it's not part of the bakery. When I click the shopping cart buttons which appear on the bakery pages I get the same URL so this doesn't work for me.
Thank you!
-
The bakery checkout is a virtual state any bakery page can have. So there is no real "checkout page".
What you can do is identify (one of your) bakery page(s) and create a link with the parameter ?view_cart=true
I.e.: www-yoursite-com/pages/bakery.php?view_cart=true
You could also use the minicart funtion built in Bakery:
http://www.bakery-shop.ch/#minicart
-
Hello Ruud, as always thank you for your kind assistance. I will give that droplet a try!
-
i use a image button with a hardcoded direct link to the shop-url (see the link in the bakery settings)
the hardcoded part, somewhere in the top of the template-index.php (change the url with your shopping-url)
<?php
define('BASKET', 'http://cms/CMS_WB/wb_reform/pages/artikeluebersicht.php');
?>
and the image-button, where ever you want in your template
<div id="basket"><a href='<?php echo BASKET; ?>?view_cart=yes'><img src='<?php echo TEMPLATE_DIR; ?>/img/warenkorb.gif' alt='Warenkorb' title='Warenkorb' style='border:0px' /><br />Zum Warenkorb</a></div>
-
Nice and elegant workaround, but what we do with the second language in 2 languages site? When I point to http://......./pages/sample.php - this is for one language - if customer comes from the second language and click on that link will go to the other (the first one). Otherwise - yes it works!
-
only a idea...
with different languages, you can use the LANGUAGE-constant in a simple PHP-Question like
<?php
if (LANGUAGE == 'EN')
{define('BASKET', 'your_link_to_the_english_overview_page');}
elseif [LANGUAGE =='ES')
{define('BASKET', 'your_link_to_the_spanish_overview_page');}
else {define('BASKET', 'your_link_to_the_default_overview_page_in_your_systemlanguage');}
also possible to write this in a different format
-
I put the code with the links, but I got completely white screen. Maybe I did any mistake. http://apokalypsabg.org/
-
sorry for that, a little typofix - using [ instead of ( in line 4 -> elseif (LANGUAGE =='ES')
<?php
if (LANGUAGE == 'EN')
{define('BASKET', 'your_link_to_the_english_overview_page');}
elseif (LANGUAGE =='ES')
{define('BASKET', 'your_link_to_the_spanish_overview_page');}
else {define('BASKET', 'your_link_to_the_default_overview_page_in_your_systemlanguage');}
-
I put on the same place where was the old code which worked for 1 language:
<?php
if (LANGUAGE == 'BG')
{define('BASKET', 'http://apokalypsabg.org/pages/knigi.php');}
elseif [LANGUAGE =='EN')
{define('BASKET', 'http://apokalypsabg.org/pages/books.php');}
else {define('BASKET', 'http://apokalypsabg.org/pages/knigi.php');}
?>
But the result is white screen.
-
I put on the same place where was the old code which worked for 1 language:
<?php
if (LANGUAGE == 'BG')
{define('BASKET', 'http://apokalypsabg.org/pages/knigi.php');}
elseif [LANGUAGE =='EN')
{define('BASKET', 'http://apokalypsabg.org/pages/books.php');}
else {define('BASKET', 'http://apokalypsabg.org/pages/knigi.php');}
?>
look here (red marked)
elseif [LANGUAGE =='EN')
must be an (
-
Works like a charm now :)