Author Topic: [SOLVED] Passing a variable from default_pricelist.php to default.php  (Read 968 times)

musqsim

  • Beginner
  • *
  • Posts: 19
Hi there,

I'm trying to achieve something that I'm not able to accomplish, so I hope you guys can help me here!

I want to check all the manufacturers present on my cart, I use it default_pricelist.php; DONE

Then If there are some of them, define a variable: $check = 'true'; ; DONE

But then i wanna use it in default.php, because i want to show an advice if this conditions met.

I try use echo $check, but it returns nothing, instead of true


How can I pass $check from default_pricelist.php in default.php

Thanks in advance!
VM 3.0.12

AH

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3510
  • VirtueMart Version: 3.8.9
Re: Passing a variable from default_pricelist.php to default.php
« Reply #1 on: January 21, 2016, 15:36:13 pm »
why do you not just check the product array data in the cart

$this->cart->products


this is available to you anywhere and you can set your test up at the relevant place in default.php
Regards
A

Joomla 3.9.27
php 7.4

musqsim

  • Beginner
  • *
  • Posts: 19
Re: Passing a variable from default_pricelist.php to default.php
« Reply #2 on: January 21, 2016, 16:21:50 pm »
Thanks a lot for your suport!

Yes, indeed this was a good answer and works.

Once more Thanks Again!


AH

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3510
  • VirtueMart Version: 3.8.9
Re: Passing a variable from default_pricelist.php to default.php
« Reply #3 on: January 21, 2016, 19:43:17 pm »
 :)
Regards
A

Joomla 3.9.27
php 7.4