# Custom Products - Feld abschicken bei Click

**URL:** https://forum.shopware.com/t/custom-products-feld-abschicken-bei-click/47646
**Category:** Programmierung
**Created:** [17. August 2017 um 11:36 UTC](https://forum.shopware.com/t/custom-products-feld-abschicken-bei-click/47646 "2017-08-17T11:36:39Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Ralf2011](https://avatars.discourse-cdn.com/v4/letter/r/8797f3/32.png) [@Ralf2011](https://forum.shopware.com/u/Ralf2011)
#### Post date: [17. August 2017 um 11:36 UTC](https://forum.shopware.com/t/custom-products-feld-abschicken-bei-click/47646/1 "2017-08-17T11:36:39Z")

</div>

Hallo,

ich habe ein Textfeld als Option. In dieses Feld wird je nach dem was der Kunde für einen Wert anklickt in das Feld geschrieben. Jetzt häng ich an der Stelle wo es den Ajax-Request macht und mir somit das “Custom Product” erstellt.

Leider sehe ich bei den erweitern von den Javascript nicht wirklich durch was ich ich wie anwenden muss:

&nbsp;

&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; $.subscribe(‘plugin/OptionManager/triggerRequest’, function(event, me) {  
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;var $el = me.el, &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;opts = me.opts; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; quantity = (me.opts.quantityBoxSelector).val();  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (!quantity) {  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; quantity = 1;  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }  
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;  
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;alert(me);

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .ajax({ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; url: me.\_url + '?sArticle=' + me.\_articleId + '&number=' + me.\_orderNumber + '&sQuantity=' + quantity, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; data: formData, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; processData: false, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; contentType: false, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; type: 'POST' &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }).done(.proxy(me.onOverviewPanelSuccess, me)).fail($.proxy(me.onOverviewPanelFail, me));  
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;  
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;  
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;});

Kann mir jemand helden wie ich schaffe den Request nachzustellen ? LG Ralf

---

<div class="post-metadata">

### Author: ![Ralf2011](https://avatars.discourse-cdn.com/v4/letter/r/8797f3/32.png) [@Ralf2011](https://forum.shopware.com/u/Ralf2011)
#### Post date: [23. August 2017 um 10:56 UTC](https://forum.shopware.com/t/custom-products-feld-abschicken-bei-click/47646/2 "2017-08-23T10:56:56Z")

</div>

Niemand eine Idee? ☹
