WebsiteBaker Community Forum

WebsiteBaker Support (2.8.x) => Bakery Shop => Topic started by: sky writer on August 22, 2015, 07:03:12 PM

Title: Multiple Bakery Sections on same Page
Post by: sky writer on August 22, 2015, 07:03:12 PM
Is it possible to have two different Bakery modules working on the same page, in different sections?
Title: Re: Multiple Bakery Sections on same Page
Post by: Gast on August 22, 2015, 07:16:45 PM
its better, to build some (invisible?) different sub- or childpages with bakery-sections for different article-groups and a general overview with members, topics or a simple wysiwyg-section

if you use bakery as multiple sections, you have the same settings, adresses, article options, payment options, invoice administration or nearly everything for both sections
all articles from both section on one overview and the detail-view for the article makes problems

P.S. bakery check the page_id and section_id for different settings or shops - if you use all shops on one page, there is no different
Title: Re: Multiple Bakery Sections on same Page
Post by: sky writer on August 23, 2015, 02:14:36 AM
Thank you for the reply.

I'm not exactly sure what you mean by
Quote
a general overview with ... a simple wysiwyg-section
, but I assume you mean have a WYSIWYG page which simply lists text links to sub page bakery sections for different articles.  For instance "T-Shirts", "Pants", "Socks", and clicking one will take you to a sub page with it's own Bakery module installation.  Is that the idea?

Unfortunately, that is not what I am after.  If possible I would like to have a "Products" page which has the following structure:
Is there a way to accomplish this?
Title: Re: Multiple Bakery Sections on same Page
Post by: sky writer on August 23, 2015, 06:51:07 AM
I don't know if it's the best or most elegant approach, but I was able to get this to work as I needed by creating the bakery sections on separate "hidden" pages and using the section_picker droplet to bring everything together on a public page.  Maybe this will help others.
Title: Re: Multiple Bakery Sections on same Page
Post by: sky writer on August 23, 2015, 07:26:08 AM
Guess I spoke too soon.  There are some issues with this approach.

When you click "continue shopping" it only goes back to the single "hidden" bakery page for the items you are looking at.  I would like it to go back to the "Products" page with the section picker of both bakery sections.

Also, if you are on the section picker page and you click the "view cart" button, it doesn't take you to the cart.  It takes you to the overview page of that particular bakery section.  You then have to click the "view cart" button on this page to actually view the cart.

Guess I am still in search for an elegant, trouble free solution.
Title: Re: Multiple Bakery Sections on same Page
Post by: Gast on August 23, 2015, 01:02:17 PM
When you click "continue shopping" it only goes back to the single "hidden" bakery page for the items you are looking at.  I would like it to go back to the "Products" page with the section picker of both bakery sections.
go into the bakery page settings and search in the template code for a link like this
Code: [Select]
<a href="[BACK]">[TXT_BACK]</a>replace [BACK] with a wblink from your overview on the Products-Page - its needed in every bakery section
Example-code
Code: [Select]
<a href="[wblink123]">[TXT_BACK]</a>
Also, if you are on the section picker page and you click the "view cart" button, it doesn't take you to the cart.  It takes you to the overview page of that particular bakery section.  You then have to click the "view cart" button on this page to actually view the cart.

i remove the view-cart-link and use the Minicart-Droplet (see also here -> http://www.bakery-shop.ch/#modbakeryminicart)
its also possible to use the view-cart-Link in a sidebar with a code like this

somewhere in your template-index.php inside of a PHP-part - the Basket-definition (define a redirect-link to your overview)
Code: [Select]
<?php
define
('BASKET''http://yourDomain/pages/products.php');
?>

and in the sidebar or a place, where you need the basket-link (needs a image for the basket and a translation)

Code: [Select]
<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>
Title: Re: Multiple Bakery Sections on same Page
Post by: sky writer on August 23, 2015, 04:14:44 PM
Thank you for your continued help.  More food for thought and possible options for the "View Cart" work-flow.

This code only seems to affect the "Back" button functionality:
Quote
<a href="[wblink123]">[TXT_BACK]</a>

I had that functionality worked out.  It's the functionality when you click the "Continue Shopping" button which I want to go to the Products page overview.  I'm assuming I will have to go into the core Bakery files to change this, but am not sure.
Title: Re: Multiple Bakery Sections on same Page
Post by: Gast on August 24, 2015, 12:46:42 PM
It's the functionality when you click the "Continue Shopping"

its difficult and the best way is, to say, thats not possible..
bakery use a variable called shop_url or continue_shopping_url or $setting_continue_url for the continue-button and! for all intern links, for add a article into the basket, for a link from the overview to a article and back and also for the continue-button
and bakery use also the section_id from the selected shop to ask the database for the correct continue- btw shop_url. for example: from a sub-shop AAAA you can only navigate to pages from the same shop AAAA

with a lot of code changes maybe its possible to build a new database field for the continue-button extra

not testet is a hard-coded version with a "new" fix URL as $setting_continue_url in file view_cart.php // Line 206 (Bakery 1.72)
maybe its work, but its looks not "clean" for me

the best and clean version is for me at this point a good text with a back-link to your product-page, maybe as a small wysiwyg-section over every bakery section
or somewhere in every needed bakery-template
Title: Re: Multiple Bakery Sections on same Page
Post by: sky writer on August 24, 2015, 04:07:43 PM
I can totally accept that it is more effort and difficulty than it would be worth to try to change the "continue shopping" button functionality.

I like you idea of placing a "go back to Products page" type text link on all bakery pages.  But to lesson confusion, would it be easily possible to hide the "continue shopping" button, so that customers only see this new "go back to Products page" link.  That way they would always end up back on the Products page.

I've also noticed that if I put something in the cart from shop AAA and then something from shot BBB, then view the cart, both items are in the cart.  I was very happy to see this happen, vs having to check out separately for each shop, BUT, I just wanted to make sure this was the way bakery should operate and that this setup wouldn't cause possible problems moving forward.
Title: Re: Multiple Bakery Sections on same Page
Post by: sky writer on August 25, 2015, 05:14:17 AM
I just noticed another issue.

When you click the "add to cart" button on the Products (overview) page, the item is NOT added to the cart.  You are taken to the overview page for the associated shop.  You then have to click on the "add to cart" button again to actually add the item to the cart.

I think I am going to have to go back to the drawing board with this one.  Maybe I am missing the usefulness and usability of the Bakery module.
Title: Re: Multiple Bakery Sections on same Page
Post by: sky writer on August 25, 2015, 05:19:43 AM
its better, to build some (invisible?) different sub- or childpages with bakery-sections for different article-groups and a general overview with members, topics or a simple wysiwyg-section

I would like to consider this approach, but am not 100% how it would function.  Would customers be able to buy items from different article-groups and then pay for everything in one check out page?  I can't seem to wrap my head around how your suggestion would look or function.  Any possibility of clarification would be greatly appreciated.  I am trying, and not wanting to be a bother.