The Thinkery

Not finding what you're looking for? Don't hesitate to contact us!

Before Posting...

Before posting questions in the forums, please be sure to read the FAQs by clicking on the FAQs link in the sidebar product menu. You must be logged in and have a valid subscription to access the SUPPORT FORUMS.
×
Support Policy Notice

As outlined in our Rules section (though never closely followed by our staff!), effective immediately we will no longer be taking time to provide customizations of our products.

QR Code on Property Flyer

More
8 years 9 months ago #27438 by tim
tim replied the topic: Re: QR Code on Property Flyer
If you created a custom print.php, then it depends what's being passed to that view. I'd var_dump($this->p) to see what you have there.

If you're just using the standard default.php view and modifying that for print, then yes, you should be able to use $this->p->id.

Are you seeing any errors in your PHP error log?

Please Log in or Create an account to join the conversation.

  • dellison1226
  • dellison1226's Avatar Topic Author
  • Offline
  • Ponderer
  • Ponderer
More
8 years 9 months ago #27439 by dellison1226
dellison1226 replied the topic: Re: QR Code on Property Flyer
Actually if I post the code like this:
$sidecol    .= '<?php echo $this->p->id; ?>';

The id does show up on the page. I guess the problem I am having is inserting the id within a url.

Like this: (the id of the listing should show up after %3D)
<img src="http://qrfree.kaywa.com/?l=1&s=8&d=http%3A%2F%2Fwww.yourdomainname.com%2Freal-estate%3Fview%3Dproperty%26id%3D<?php echo $this->p->id; ?>" alt="QRCode"/>

Of course the QR Code shows up but when I check the url it displays it exactly as I have it.

Please Log in or Create an account to join the conversation.

More
8 years 9 months ago #27440 by tim
tim replied the topic: Re: QR Code on Property Flyer
it's hard to say without seeing the code in context.

I'd guess you need to take a look at where that code block is since it's clearly not being interpreted by PHP-- so it's possibly surrounded by single quotes, etc.

Please Log in or Create an account to join the conversation.

  • dellison1226
  • dellison1226's Avatar Topic Author
  • Offline
  • Ponderer
  • Ponderer
More
8 years 9 months ago #27441 by dellison1226
dellison1226 replied the topic: Re: QR Code on Property Flyer
This is the actual code I am trying to get to work
$sidecol	.='<br /><img src="http://qrfree.kaywa.com/?l=1&s=8&d=http%3A%2F%2Fwww.yourdomainname.com%2Freal-estate%3Fview%3Dproperty%26id%3D<?php echo $this->p->id; ?>" alt="QRCode"/>';


Where this <?php echo $this->p->id; ?> should = id #

Please Log in or Create an account to join the conversation.

More
8 years 9 months ago #27442 by tim
tim replied the topic: Re: QR Code on Property Flyer
No, you need to do it like this:
$sidecol .='...property%26id%3D'.$this->p->id.'" alt="QRCode"/>';

You can see I snipped a bunch of code out to make it more clear. . .

Please Log in or Create an account to join the conversation.

  • dellison1226
  • dellison1226's Avatar Topic Author
  • Offline
  • Ponderer
  • Ponderer
More
8 years 9 months ago #27443 by dellison1226
dellison1226 replied the topic: Re: QR Code on Property Flyer
Thank you very much. It was working correctly now.

Please Log in or Create an account to join the conversation.

Time to create page: 0.284 seconds