Jump to content

Nerloggz

Members
  • Posts

    13
  • Joined

  • Last visited

Profile Information

  • Activity
    Freelancer

Nerloggz's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. I found out the problem : there's a missing } at the end of the Attribute code, and don't forget to add <?php at the start and ?> at the end of both Attribute et ProductController files
  2. Thanks for the info ! But the only thing I want to know is in which precise file are all the input content sent to the database during the order ?
  3. Worked out really well, thanks a lot ! Just a little summary of what I did in case someone else needs it : - Added three attributes (rice, soup, salad) with values : None, 1, 2, 3, etc... as select input - Added a caracteristic to products which is the number of additionnal dishes allowed - Displayed on the product page the number of dishes allowed, using the above caracteristic - In Jquery, on change of any select, I get the value of the caracteristic and the total value of the selects. Then I compare the two. - If the total is inferior to the dishes allowed, I tell the customer that he can choose more plates by precising the exact number of plates missing (using Jquery to modify content of paragraph). - Same if the total is superior. Thanks for the help, hope this will be useful for anyone else !
  4. Hmmm, so basically in which file do I need to get the value and add it to $order ? (using Tools::getValue('myVariable'); I guess ?) I'm sorry, I'm really new to this but I'm slowly beginning to understand ! Thanks a lot for the answer.
  5. That's a really nice idea ! I'm going to try that out. Thanks !
  6. Hi ! So what I want to do seems quite simple : allowing the customers to choose a precise hour of delivery for their order (to be displayed in the back-office). I did some research and this is what I did so far : - Added "myVariable" to ps_cart table. - Added public $myVariable in Cart.php - Added 'myVariable' => array('type' => self::TYPE_DATE) in $definition in Cart.php - Created a module : <?php if (!defined('_PS_VERSION_')) exit; class heureLivraison extends Module { public function __construct() { $this->name = 'heurelivraison'; $this->tab = 'front_office_features'; $this->version = '1.0'; $this->author = 'COLIN Théotime'; $this->need_instance = 0; $this->ps_versions_compliancy = array('min' => '1.5', 'max' => '1.6'); $this->bootstrap = true; parent::__construct(); $this->displayName = $this->l('Heure livraison'); $this->description = $this->l('Permet aux clients de choisir une heure de livraison précise.'); $this->confirmUninstall = $this->l('Are you sure you want to uninstall?'); if (!Configuration::get('HEURELIVRAISON_NAME')) $this->warning = $this->l('No name provided'); } public function install() { if (!parent::install()) return false; return true; } public function uninstall() { if (!parent::uninstall()) return false; return true; } public function hookActionCarrierProcess($params) { $cart = $params['cart']; $cart->myVariable = Tools::getValue('myVariable'); } } - Installed it and hooked it to ActionCarrierProcess. - Added an input on the check out page. Though, the variable isn't added to the table. I think my module isn't working as even with a fixed date, nothing is added. Thanks for help ! May give away a little reward (Amazon gift card or anything else) if anyone can help me figure this out.
  7. That's a nice idea, though if the user has to choose 8 side dishes, I'm afraid it'll be annoying to have to change all height select boxes... That's why I wanted to do my own development to have in my database : Number of Rice : 2 Number of Salad : 6 Number of Soup : 0 And on the front office it would simply be 3 number input. Thanks for the help !
  8. No one can help ? I really don't know where to begin...
  9. Thank you ! That solves my first problem. But it doesn't work on Quickview : I just want to have a menu on the product page, but I don't want this menu on Quickview, is there a way to do that ?
  10. Hello, Is there a way to test if we are currently on a product page ? I want to hide breadcrumb on all pages except product pages. I also want to show divs only when on the product page, and not in Quickview. That would really help me ! Thanks you.
  11. Hey, I'm starting customizing my online japanese shop for a client and I really need a feature which is not included by default : When ordering a menu, the customer would be able to choose a certain amount of free dishes between a few choices (exemple : For a 12$ menu, you can choose one soup and one rice bowl OR two soups, etc...). I've been looking for modules and the closest of what I want is this : http://addons.prestashop.com/en/merchandising-prestashop-modules/442-gift-on-order-add-gifts-to-customer-cart.html Unfortunately, it is still not updated for 1.6 and is quite expensive for what I want to do. I'm open to doing development myself (I'll have to learn it anyway, I can't always rely on paid modules) but I'm just lost. I've been reading the official doc but I just don't get how I can do that. In my mind it would be quite simple : add a input on the product page, get the value of the input, store it in the bdd and then display it in the back-office in the order. But is it harder than I think ? What do I need to learn to achieve that ? Do I need to create a new module, override ? I'm kind of lost I have to say... I don't know where to begin. Thanks to anyone that can help me !
×
×
  • Create New...