dynamic / foxystripe

FoxyStripe is a SilverStripe ecommerce module that integrates with FoxyCart.
http://foxystripe.org
BSD 3-Clause "New" or "Revised" License
8 stars 11 forks source link

Add current product to purchase form extension points #361

Closed mak001 closed 5 years ago

mak001 commented 5 years ago

It would be nicer to include the current product in the parameters passed to updatePurchaseFormFields and updateFoxyStripePurchaseFormFields.

https://github.com/dynamic/foxystripe/blob/6d9130940a898ed5f92f8050b5572712f42a6eb3/src/Form/FoxyStripePurchaseForm.php#L223

https://github.com/dynamic/foxystripe/blob/6d9130940a898ed5f92f8050b5572712f42a6eb3/src/Form/FoxyStripePurchaseForm.php#L228

muskie9 commented 5 years ago

This can currently be accomplished via your Extension by calling $this->owner->getProduct(). That will return the product currently used by the form.