$this->view->print = isset($_GET['print']);
- $currency = 978;
- if ($this->view->devis->magasin == 'paris11') {
- $this->view->magasin = 11;
- $sgc = new CubeIT_Payment_Sogecommerce();
- $this->view->paymentForm = $sgc->getForm($this->view->devis->id, $amounts['ttc'], $currency, $this->view->devis->email, 'fr');
- $this->view->paymentAddForm = '<iframe name="sogecommerceIframe" id="sogecommerceIframe"></iframe><script>$(function(){$("#sogecommerce").submit()})</script>';
- } else {
- $this->view->magasin = 15;
- $sogenactif = new CubeIT_Payment_Sogenactif();
- $form = $sogenactif->getForm($this->view->devis->id, $amounts['ttc'], $currency, $this->view->devis->email, 'fr');
- $this->view->paymentForm = $form;
- $submit = new CubeIT_Form_Element_Html('image');
- $submit->setLabel($this->view->link($this->view->image('/images/devis/cartes.png'), '#', array('class' => 'submit')));
- $this->view->paymentForm->addElement($submit);
+ if($amounts['ttc']>0) {
+ $currency = 978;
+ if ($this->view->devis->magasin == 'paris11') {
+ $this->view->magasin = 11;
+ $sgc = new CubeIT_Payment_Sogecommerce();
+ $this->view->paymentForm = $sgc->getForm($this->view->devis->id, $amounts['ttc'], $currency, $this->view->devis->email, 'fr');
+ $this->view->paymentAddForm = '<iframe name="sogecommerceIframe" id="sogecommerceIframe"></iframe><script>$(function(){$("#sogecommerce").submit()})</script>';
+ } else {
+ $this->view->magasin = 15;
+ $sogenactif = new CubeIT_Payment_Sogenactif();
+ $form = $sogenactif->getForm($this->view->devis->id, $amounts['ttc'], $currency, $this->view->devis->email, 'fr');
+ $this->view->paymentForm = $form;
+ $submit = new CubeIT_Form_Element_Html('image');
+ $submit->setLabel($this->view->link($this->view->image('/images/devis/cartes.png'), '#', array('class' => 'submit')));
+ $this->view->paymentForm->addElement($submit);
+ }
}