Prestashop : quote module (devis)

ScreenshotPrestashopDevis

The quote feature  is  an implementation of a shopping cart within prestashop framework, without the price : we have designed this feature for specific groups, for which we deactivate the price display on the shop.

  • Deactivating price display for specific user group (below : group 2) is a long task that involves 2 different steps
    • in init.php : set the smarty variable around line 116
      1. $priceDisplayConfig = intval(Configuration::get(‘PS_PRICE_DISPLAY’));
      2. if($tmpCust->isMemberOfGroup(2)) $priceDisplayConfig = 3;

      And around line 155

      1. ‘priceDisplay’ => $priceDisplayConfig
    • use the smarty $priceDisplay variable in the templates to hide prices and change the “cart’ (panier in french) to “quote” (devis), example from homefeature.tpl
      1. {if $priceDisplay<3}{l s=‘Add to cart’ mod=‘homefeatured’}{else} Ajouter au devis {/if}
  • Quote / Devis module and status :
    • Download and install the “devis” module Module Devis pour prestashop (601)
    • create the mails/devis.html and mail/devis.txt and change texts according to your business
    • create the order status “devis en cours” in BackOffice >> Orders >> statuses, check the created id (12 here) and add the following line to config.inc.php :
      1. define(‘_PS_OS_DEVIS_EN_COURS’, 12);
    • You can optionnally deactivate the order confirmation email in classes/PaymentModule.php, line 288-290, replace the send email to customer test by adding a new condition :
      1.         // Send an e-mail to customer
      2. if ($id_order_state != _PS_OS_ERROR_ AND $id_order_state != _PS_OS_CANCELED_ AND $customer->id
      3. AND $id_order_state != _PS_OS_DEVIS_EN_COURS)
  1. 5 Responses to “Prestashop : quote module (devis)”

  2. Hello,

    Just two question : where is the init.php you’re talking about ? Is it one on the root of install ?

    Another one : Does it work with Prestasohp 1.2.5 ?

    Tks

    Ben

    By Ben on Dec 21, 2009

  3. Hello,

    How can i use prestashop as a catalogue? I dont want the price and cart to be displayed.

    Thank you

    By joe matt on Jan 6, 2010

  4. actually when I comment this line

    //if($tmpCust->isMemberOfGroup(2)) $priceDisplayConfig = 3;

    the page appears back again…
    Maybe there is something wrong about that line against my version of prestashop…

    thanks again.

    By Yuridek on Feb 8, 2010

  5. Hi !
    I’have tryed many init.php files from many versions of PS but i can’t see the variables exactly like you write them ? Can you help me ?

    Many thanks,

    Claude.

    By Claude on May 3, 2010

  6. Hi, this module was developed on version 1.2.4 and requires deep knowledge of Prestashop AND PHP

    this article gives indications only, I have not developped a ready to use module yet, for those interested please contact me directly via contact form

    http://www.webmasterbulletin.net/about/contact-us

    Thanks and good luck

    By admin on May 3, 2010

Post a Comment