Jump to content

Liyali

Members
  • Posts

    4
  • Joined

  • Last visited

Profile Information

  • Activity
    Agency

Recent Profile Visitors

1,795,653 profile views

Liyali's Achievements

Newbie

Newbie (1/14)

3

Reputation

  1. Thank you for your explanation, I managed to do it using with a very similar way too. Hope this can help someone else in the future.
  2. How can I add my custom field to the contextual cart for a OnePageCheckout process?
  3. Thank you Elpatron for your prompt answer. However, my custom field has no relationship with any product of my catalog. Imagine for example a "Receipt" field, which means that when it is checked, a receipt will be sent with this purchase.
  4. Hi everybody, I need to add a custom field (checkbox) during the Checkout process and then register the data in database. Later I would like to have this data appearing on the PDF invoice in the back-office. What I have done so far: - Create the field in the template /themes/themeName/order-carrier.tpl (I want my field to appear right after the TOS section) - Add a new field in database in the ps_orders table (TINYINT) - Add this function in /override/classes/Order.php : <?php class Order extends OrderCore { public $myFieldName; public function getFields() { $fields = parent::getFields(); $fields['myFieldName'] = pSQL($this->myFieldName); return $fields; } } When I die(); inside my getFields() function (var_dump($myFieldName);die;), it appears that my field is always empty. In fact it seems obvious since I never filled $myFieldName before. There is probably a function to override where I should have something like: $myFieldName = $_POST['myFieldName']; but I have no idea where to do that though. Does anyone can help me? Any PS [spam-filter] around here? Also, any idea how to deal with the invoice later on? Thanks
×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More