Buyitrighthere Posted August 14, 2014 Share Posted August 14, 2014 Hello, to be able to send out e-mails via the referral program you have to first order at least 1 product from the store. Is there in any way possible to change this to 0 orders? So that the customers can start referring without buying anything? Do I need to change anything in the referralprogram.php? Best regards// Tobias Link to comment Share on other sites More sharing options...
anncrow Posted August 14, 2014 Share Posted August 14, 2014 Hi Tobias, In Modules, find the Customer Referral Program module, click Configure, and you'll be able to change the minimum numbers of orders to be a sponsor to zero (as well as adjust what type of voucher they get). Save and you're done! Cheers, Ann Link to comment Share on other sites More sharing options...
Buyitrighthere Posted August 14, 2014 Author Share Posted August 14, 2014 Hello Ann, I wish it was that simple When you type 0 in the "minimum order" field it just say "Order quantity is required/invalid." So I need to change something in the PHP code, but I just don't know where to find it Thanks/ Tobias Link to comment Share on other sites More sharing options...
anncrow Posted August 14, 2014 Share Posted August 14, 2014 Ha! Sorry! I thought I had made that change, but upon verification, I am getting the same warning message you mentioned. I'll keep an eye on this thread then, because I'd like to do the same thing. Good luck! A Link to comment Share on other sites More sharing options...
ventesites Posted September 9, 2014 Share Posted September 9, 2014 it's in modules/referralprogram/referralprogram.php around line 162 comment like I did, this way a customer doesn't need to place an order to use this program private function _postValidation() { $this->_errors = array(); /* if (!(int)(Tools::getValue('order_quantity')) OR Tools::getValue('order_quantity') < 0) $this->_errors[] = $this->displayError($this->l('Order quantity is required/invalid.')); */ if (!is_array(Tools::getValue('discount_value'))) $this->_errors[] = $this->displayError($this->l('Discount value is invalid.')); foreach (Tools::getValue('discount_value') AS $id_currency => $discount_value) if ($discount_value == '') $this->_errors[] = $this->displayError(sprintf($this->l('Discount value for the currency #%d is empty.'), $id_currency)); elseif (!Validate::isUnsignedFloat($discount_value)) $this->_errors[] = $this->displayError(sprintf($this->l('Discount value for the currency #%d is invalid.'), $id_currency)); if (!(int)(Tools::getValue('discount_type')) OR Tools::getValue('discount_type') < 1 OR Tools::getValue('discount_type') > 2) $this->_errors[] = $this->displayError($this->l('Discount type is required/invalid.')); if (!(int)(Tools::getValue('nb_friends')) OR Tools::getValue('nb_friends') < 0) $this->_errors[] = $this->displayError($this->l('Number of friends is required/invalid.')); if (!(int)(Tools::getValue('discount_value_percentage')) OR (int)(Tools::getValue('discount_value_percentage')) < 0 OR (int)(Tools::getValue('discount_value_percentage')) > 100) $this->_errors[] = $this->displayError($this->l('Discount percentage is required/invalid.')); } 1 Link to comment Share on other sites More sharing options...
Buyitrighthere Posted September 13, 2014 Author Share Posted September 13, 2014 it's in modules/referralprogram/referralprogram.php around line 162 comment like I did, this way a customer doesn't need to place an order to use this program private function _postValidation() { $this->_errors = array(); /* if (!(int)(Tools::getValue('order_quantity')) OR Tools::getValue('order_quantity') < 0) $this->_errors[] = $this->displayError($this->l('Order quantity is required/invalid.')); */ if (!is_array(Tools::getValue('discount_value'))) $this->_errors[] = $this->displayError($this->l('Discount value is invalid.')); foreach (Tools::getValue('discount_value') AS $id_currency => $discount_value) if ($discount_value == '') $this->_errors[] = $this->displayError(sprintf($this->l('Discount value for the currency #%d is empty.'), $id_currency)); elseif (!Validate::isUnsignedFloat($discount_value)) $this->_errors[] = $this->displayError(sprintf($this->l('Discount value for the currency #%d is invalid.'), $id_currency)); if (!(int)(Tools::getValue('discount_type')) OR Tools::getValue('discount_type') < 1 OR Tools::getValue('discount_type') > 2) $this->_errors[] = $this->displayError($this->l('Discount type is required/invalid.')); if (!(int)(Tools::getValue('nb_friends')) OR Tools::getValue('nb_friends') < 0) $this->_errors[] = $this->displayError($this->l('Number of friends is required/invalid.')); if (!(int)(Tools::getValue('discount_value_percentage')) OR (int)(Tools::getValue('discount_value_percentage')) < 0 OR (int)(Tools::getValue('discount_value_percentage')) > 100) $this->_errors[] = $this->displayError($this->l('Discount percentage is required/invalid.')); } Hello, this line: if (!(int)(Tools::getValue('order_quantity')) OR Tools::getValue('order_quantity') < 0) $this->_errors[] = $this->displayError($this->l('Order quantity is required/invalid.')); was already like that in my referralprogram.php But the referral program still wants me to have at least 1 order. Link to comment Share on other sites More sharing options...
Buyitrighthere Posted September 19, 2014 Author Share Posted September 19, 2014 Anyone? Link to comment Share on other sites More sharing options...
dioniz Posted September 19, 2014 Share Posted September 19, 2014 ventesites meant you need to comment out that code. Put /* at the beginning and */ at the end as you can see in his/her post Link to comment Share on other sites More sharing options...
Buyitrighthere Posted September 19, 2014 Author Share Posted September 19, 2014 Aha perfect! Thank you, now it worked fine! Link to comment Share on other sites More sharing options...
Recommended Posts