Please help us to make AbanteCart Ideal Open Source Ecommerce Solution for everyone.

Support AbanteCart eCommerce

Author Topic: How can i get the customer_id in cart.php  (Read 2477 times)

Offline Claudio Garcia

  • Newbie
  • *
  • Posts: 35
  • Karma: +7/-0
    • View Profile
How can i get the customer_id in cart.php
« on: October 21, 2019, 03:58:56 PM »
I need to do a validation and want to know how can i get the customer_id from user who is in the cart processing an order.

Thanks

Offline Sam_78

  • Sr. Member
  • ****
  • Posts: 270
  • Karma: +42/-1
    • View Profile
Re: How can i get the customer_id in cart.php
« Reply #1 on: October 21, 2019, 04:33:23 PM »
\storefront\controller\pages\checkout\cart.php

Offline Claudio Garcia

  • Newbie
  • *
  • Posts: 35
  • Karma: +7/-0
    • View Profile
Re: How can i get the customer_id in cart.php
« Reply #2 on: October 21, 2019, 06:54:44 PM »
Hi Sam

I am in: \storefront\controller\pages\checkout\cart.php

But i dont know how to call customer_id, how to assign the value to a variable, for example:

$customerid = $this.order[customer_id]

Offline Claudio Garcia

  • Newbie
  • *
  • Posts: 35
  • Karma: +7/-0
    • View Profile
Re: How can i get the customer_id in cart.php
« Reply #3 on: October 28, 2019, 04:24:17 PM »
I will answer to myself

The right instruction is:

Code: [Select]
(int)$this->customer->getId()
« Last Edit: October 28, 2019, 04:27:38 PM by Claudio Garcia »

 

Powered by SMFPacks Social Login Mod