Search found 4 matches

Page 1 of 1

Search found 4 matches

Re: Passsing PHP variable values to template

Thanks for the option to display based on items purchased in the current session, straightlight. Please note, however, that the goal was to selectively display the button based upon any and all historical purchases for the logged in user (this is for a digital media site). I got it straightened out,...

Jump to post
  • Fri Apr 20, 2018 1:14 am
  • Replies 7
  • Views 737
Re: Passsing PHP variable values to template

Ah ! I see, you are trying to build an API for Opencart. No problem, refer to this example which will save you a lot of time compared to the code above: https://forum.opencart.com/viewtopic.php?f=191&t=203344&p=719531#p719531 . Thanks for the link, straightlight. I don't think that I'm trying to cr...

Jump to post
  • Tue Apr 17, 2018 6:50 am
  • Replies 7
  • Views 737
Re: Passsing PHP variable values to template

Version 3.0.2.0; full code too long to post; here is the full addition to product.php; hope it's enough: //Recordset and variable setting for customer ID from session variable // Create connection $mysqli = new mysqli($servername, $username, $password, $dbname); // Check connection if ($mysqli->conn...

Jump to post
  • Tue Apr 17, 2018 4:53 am
  • Replies 7
  • Views 737
Passsing PHP variable values to template

I've added the appropriate queries in catalog\controller\product\product.php to determine if a customer has previously purchased a given product and confirmed that they are working correctly. Now, I'd like to conditionally display the "Add to Cart" button, based on the result of said query. Here's t...

Jump to post
  • Mon Apr 16, 2018 1:03 pm
  • Replies 7
  • Views 737

Page 1 of 1

Search found 4 matches