WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.9 R24 is now available!


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Bakery Shop »
  • Bakery Module
  • Print
Pages: 1 [2]   Go Down

Author Topic: Bakery Module  (Read 35079 times)

snark

  • Guest
Re: Bakery Module
« Reply #25 on: October 09, 2010, 04:58:27 PM »
Quote from: mjm4842 on August 31, 2010, 07:34:54 PM
Solution #2 - The backwards compatible solution

Instead of removing the red text as described in the above message, replace it with $sql_showall. For example:

WHERE $sql_sectiononly

Then insert the following lines right above the line that says // Get total number of items

if (isset($_GET['showall'])) {
   $sql_sectiononly = '';
} else {
   $sql_sectiononly = "section_id = '$section_id' AND ";
}


As a result, the basic functionality of your pages will not change and the list will only include items in your page (or category if you prefer).

To list all items, just create a manual link that has the same address you would normally use but add a "?showall" to the end of the address. For example:

http://www.yoursite.com/pages/yourshopname/my-shop.php?showall

Limitation: If you view an item and then click the Back link, you will no longer see the full list.

Michael

With this idea it would also be possible to make à filter option, making it possible to filter on brand, price, etc....
Logged

  • Print
Pages: 1 [2]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Bakery Shop »
  • Bakery Module
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2