Hi,
Non-developer here, so sorry if it's an annoying question.
I'd like to create a block, that will show the Price and the Add to cart button (like the attached snap). What's would be the PHP for that?
| Preview | Attachment | Size |
|---|---|---|
![]() | Snap1.png | 37.1 KB |
|
Ubercart |
|
|
|
||
|
Mon, 10/22/2007 - 02:07
Hi,
Re: How to create a block with 'Add to cart'
you would use the function node_api (look it up at api.drupal.org) and then when the node you are displaying is of type X your product, then you can create/fill a block with the price in the $node object and you also would create a link with the print function like /addtocart/$node->nid ...
Re: Re: How to create a block with 'Add to cart'
thanks oslinux. hmm, am I even close? <?php
Re: Re: Re: How to create a block with 'Add to cart'
Here's the answer (thanks to contemplate module): 1. install contemplate module.
Re: Re: How to create a block with 'Add to cart'
I've posted some info here http://drupal.org/node/1143596 |
|