[Skip to main content](#vessel-content)

#   Apply a custom price to an external product

##

- **[Teonnyn](/forum/user/8708-teonnyn "View Teonnyn's Profile")**
- [![Teonnyn's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/8708-teonnyn "View Teonnyn's Profile") Topic Author
- [ Offline](/forum/user/8708-teonnyn)

Less More

- Posts: 15
- Thank you received: 0
-
-

14 years 3 weeks ago -  14 years 3 weeks ago [\#72331](#72331) by [Teonnyn](/forum/user/8708-teonnyn "View Teonnyn's Profile")  *[Apply a custom price to an external product](/forum/4-how-to/72331-apply-a-custom-price-to-an-external-product#72331 "I have an Invoice product I'm trying to import into the user's shopping cart - this product is dynamically created and priced, and it seems as if the Donation plugin would be perfect to get it in the...")* was created by *[Teonnyn](/forum/user/8708-teonnyn "View Teonnyn's Profile")*

I have an Invoice product I'm trying to import into the user's shopping cart - this product is dynamically created and priced, and it seems as if the Donation plugin would be perfect to get it in the system. However.. how do I use this plugin inside a custom component? What would I use to call it, and where would I put the product price?

Last edit: 14 years 3 weeks ago by [Teonnyn](/forum/user/8708-teonnyn "View Teonnyn's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzcyMzMxLWFwcGx5LWEtY3VzdG9tLXByaWNlLXRvLWFuLWV4dGVybmFsLXByb2R1Y3Q/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Teonnyn](/forum/user/8708-teonnyn "View Teonnyn's Profile")**
- [![Teonnyn's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/8708-teonnyn "View Teonnyn's Profile") Topic Author
- [ Offline](/forum/user/8708-teonnyn)

Less More

- Posts: 15
- Thank you received: 0
-
-

14 years 3 weeks ago -  14 years 3 weeks ago [\#72351](#72351) by [Teonnyn](/forum/user/8708-teonnyn "View Teonnyn's Profile")  Replied by *[Teonnyn](/forum/user/8708-teonnyn "View Teonnyn's Profile")* on topic *[Apply a custom price to an external product](/forum/4-how-to/72331-apply-a-custom-price-to-an-external-product#72351 "I have an Invoice product I'm trying to import into the user's shopping cart - this product is dynamically created and priced, and it seems as if the Donation plugin would be perfect to get it in the...")*

Okay.. here's what I'm trying to do - I have an external component and it generates a price. I want to export that price into HikaShop onto the donation item and into their shopping cart. At the moment I have the code for the demo mostly working but it won't affect the product price.

Price: &lt;input id="amount" type="text" value="&lt;? print_r($orders[0][7]); ?&gt;" readonly="readonly" onSubmit="hikashopToggleFields(this.value,'amount','invoice_order',0);" name="data[invoice_order][amount]"/&gt;
Amount: &lt;input id="hikashop_product_quantity_field_1" type="text" value="1" readonly="readonly" /&gt;
&lt;/td&gt;
&lt;td rowspan="2"&gt;
&lt;input type="submit" class="button hikashop_cart_input_button" name="add" value="Add to cart" onclick="var field=document.getElementById('hikashop_product_quantity_field_1');if(hikashopCheckChangeForm('item','hikashop_product_form')){ return hikashopModifyQuantity('359',field,1,'hikashop_product_form','cart'); } else { return false; }"&gt;

Last edit: 14 years 3 weeks ago by [Teonnyn](/forum/user/8708-teonnyn "View Teonnyn's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzcyMzMxLWFwcGx5LWEtY3VzdG9tLXByaWNlLXRvLWFuLWV4dGVybmFsLXByb2R1Y3Q/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86576
- Thank you received: 14320
-
-

14 years 3 weeks ago [\#72583](#72583) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Apply a custom price to an external product](/forum/4-how-to/72331-apply-a-custom-price-to-an-external-product#72583 "I have an Invoice product I'm trying to import into the user's shopping cart - this product is dynamically created and priced, and it seems as if the Donation plugin would be perfect to get it in the...")*

Hi,

The problem comes from the name.
It should not be data[invoice_order][amount] but data[item][amount]

"item" in the data variable is the table of the custom field. So it has to be item and you have to have a custom field of the table "item" with the column name "amount" already created.

You can see any example on our demo website:
[ demo.hikashop.com/index.php?option=com\_h...ct&amp;task=show&amp;cid=214](http://demo.hikashop.com/index.php?option=com_hikashop&ctrl=product&task=show&cid=214)

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzcyMzMxLWFwcGx5LWEtY3VzdG9tLXByaWNlLXRvLWFuLWV4dGVybmFsLXByb2R1Y3Q/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.045 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
