Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi
Can not print $row->buyitnowbutton.
I've add in my product view fields:
- the Product: Buy it now button field,
- the global php field,
. Pick from available variables $row->buyitnowbutton,
. Add in Output code the following simple code:
$row->buyitnowbutton;
print "<div class=\"buy-it-now\">" . $row->buyitnowbutton . " </div>";
and got the html blelow:
<div class="views-field views-field-php-3">
<span class="views-label views-label-php-3">PHP: </span>
<span class="field-content">
<div class="buy-it-now"> </div> //an "buy it now" button form code should appear here in this div, but didn't.
</span>
</div>
A "buy it now button" form should appear in the div class "buy-it-now", but didn't.
I'm using drupal 7 and ubercart 3.x with view php to add custom fields, classes and filter in my product view.
Comments
Comment #1
codesmithSee
http://drupal.org/node/1140896
Comment #2
Liam Morland