WebsiteBaker Community Forum

WebsiteBaker Support (2.8.x) => Bakery Shop => Topic started by: daydreamer on October 30, 2011, 06:05:44 PM

Title: Anyitems add to cart does not work
Post by: daydreamer on October 30, 2011, 06:05:44 PM
Hi, has anyone else found that using anyitems the add to cart or view cart does not work, as it sets incorrect url?

Thanks
Title: Re: Anyitems add to cart does not work
Post by: daydreamer on October 30, 2011, 09:05:29 PM
Ok I seem to have solved the problem, anyone needing a quick fix here you go.

Open include.php find
Code: [Select]
// Settings of the anyitems function
$setting_items_per_page = $items_per_page;
$setting_num_cols = $num_cols;

After add
Code: [Select]
// Get continue url
$query_continue_url = $database->query("SELECT p.link FROM ".TABLE_PREFIX."pages p INNER JOIN ".TABLE_PREFIX."mod_bakery_page_settings ps ON p.page_id = ps.page_id WHERE p.page_id = ps.continue_url AND ps.section_id = '$section_id'");
if ($query_continue_url->numRows() > 0) {
$fetch_continue_url = $query_continue_url->fetchRow();
$setting_continue_url = WB_URL.PAGES_DIRECTORY.stripslashes($fetch_continue_url['link']).PAGE_EXTENSION;
}
Title: Re: Anyitems add to cart does not work
Post by: freeSbee on October 30, 2011, 09:28:20 PM
Hi daydreamer

Thank you for the fix. I have just upgraded at AMASP:
http://www.websitebakers.com/pages/code-snippets/listings/anyitems.php

Regards Christoph
Title: Re: Anyitems add to cart does not work
Post by: daydreamer on October 31, 2011, 11:11:21 AM
Your welcome, I really needed this working for a client.