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

#   Bulk Add To Cart

##

- **[icomex](/forum/user/4967-icomex "View icomex's Profile")**
- [![icomex's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4967.png)](/forum/user/4967-icomex "View icomex's Profile") Topic Author
- [ Offline](/forum/user/4967-icomex)

Less More

- Posts: 149
- Thank you received: 6
-
-

8 years 6 months ago [\#291843](#291843) by [icomex](/forum/user/4967-icomex "View icomex's Profile")  *[Bulk Add To Cart](/forum/31-development/894551-bulk-add-to-cart#291843 "-- HikaShop version -- : 3.4.0 -- Joomla version -- : 3.8.7 -- PHP version -- : 7.1.14  I'm going to be starting a project soon which will require me to give Hikashop a new interface allowing registered users to submit a CSV string which will identify 1 to X items to be added to the User's shopping cart (similar in function to Hikashop's Bulk Product Input within the Administrator tools).  Adding a feature like this doesn't seem to be a normal in-Hikashop customization route, so I am guessing that I will need to physically add a new View and a new Controller. Submitting to a page without a Layout value gives me an Access error, and using a layout value overrides the submitted Task value. A little tinkering has shown me that a better understanding of Hikashop's custom Router may provide serious help on this project. Is there any formal documentation or guidance on the Router?  I have inserted a new View folder and templates, and can reach them through a custom browser address (&quot;?option=com&#95;hikashop&amp;view=bulk&quot;), but I haven't managed to create a suitable Menu Item Type option under Hikahsop's list yet.  In this new Controller (extending hikashopController), the standard Joomla method of submitting an action value with the format &quot;controller:taskname&quot; doesn't automatically trigger the class method &quot;taskname&quot;, so I am using an IF statement to trigger it, and plan to redirect the browser back to the same page after the submitted CSV text is parsed and items are added to the cart, with confirmation reported via Joomla Messages.  Any other suggestions or moving pieces I should be concerned about? Suggestions?")* was created by *[icomex](/forum/user/4967-icomex "View icomex's Profile")*

-- HikaShop version -- : 3.4.0
-- Joomla version -- : 3.8.7
-- PHP version -- : 7.1.14

I'm going to be starting a project soon which will require me to give Hikashop a new interface allowing registered users to submit a CSV string which will identify 1 to X items to be added to the User's shopping cart (similar in function to Hikashop's Bulk Product Input within the Administrator tools).

Adding a feature like this doesn't seem to be a normal in-Hikashop customization route, so I am guessing that I will need to physically add a new View and a new Controller. Submitting to a page without a Layout value gives me an Access error, and using a layout value overrides the submitted Task value. A little tinkering has shown me that a better understanding of Hikashop's custom Router may provide serious help on this project. Is there any formal documentation or guidance on the Router?

I have inserted a new View folder and templates, and can reach them through a custom browser address ("?option=com_hikashop&amp;view=bulk"), but I haven't managed to create a suitable Menu Item Type option under Hikahsop's list yet.

In this new Controller (extending hikashopController), the standard Joomla method of submitting an action value with the format "controller:taskname" doesn't automatically trigger the class method "taskname", so I am using an IF statement to trigger it, and plan to redirect the browser back to the same page after the submitted CSV text is parsed and items are added to the cart, with confirmation reported via Joomla Messages.

Any other suggestions or moving pieces I should be concerned about? Suggestions?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg5NDU1MS1idWxrLWFkZC10by1jYXJ0P3RtcGw9bWFya2Rvd24=) 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")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86541
- Thank you received: 14304
-
-

8 years 6 months ago [\#291853](#291853) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Bulk Add To Cart](/forum/31-development/894551-bulk-add-to-cart#291853 "-- HikaShop version -- : 3.4.0 -- Joomla version -- : 3.8.7 -- PHP version -- : 7.1.14  I'm going to be starting a project soon which will require me to give Hikashop a new interface allowing registered users to submit a CSV string which will identify 1 to X items to be added to the User's shopping cart (similar in function to Hikashop's Bulk Product Input within the Administrator tools).  Adding a feature like this doesn't seem to be a normal in-Hikashop customization route, so I am guessing that I will need to physically add a new View and a new Controller. Submitting to a page without a Layout value gives me an Access error, and using a layout value overrides the submitted Task value. A little tinkering has shown me that a better understanding of Hikashop's custom Router may provide serious help on this project. Is there any formal documentation or guidance on the Router?  I have inserted a new View folder and templates, and can reach them through a custom browser address (&quot;?option=com&#95;hikashop&amp;view=bulk&quot;), but I haven't managed to create a suitable Menu Item Type option under Hikahsop's list yet.  In this new Controller (extending hikashopController), the standard Joomla method of submitting an action value with the format &quot;controller:taskname&quot; doesn't automatically trigger the class method &quot;taskname&quot;, so I am using an IF statement to trigger it, and plan to redirect the browser back to the same page after the submitted CSV text is parsed and items are added to the cart, with confirmation reported via Joomla Messages.  Any other suggestions or moving pieces I should be concerned about? Suggestions?")*

Hi,

You'll indeed need to have a new view and controller.
The best would be to go through our API.
I would recommend to check on the code of the email history plugin (in plugins/hikashop/email_history).
This plugin adds its own controller and views to HikaShop, even adding a menu element to the backend menu of HikaShop.
So it's a really good starting point.

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

- **[icomex](/forum/user/4967-icomex "View icomex's Profile")**
- [![icomex's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4967.png)](/forum/user/4967-icomex "View icomex's Profile") Topic Author
- [ Offline](/forum/user/4967-icomex)

Less More

- Posts: 149
- Thank you received: 6
-
-

8 years 6 months ago [\#291887](#291887) by [icomex](/forum/user/4967-icomex "View icomex's Profile")  Replied by *[icomex](/forum/user/4967-icomex "View icomex's Profile")* on topic *[Bulk Add To Cart](/forum/31-development/894551-bulk-add-to-cart#291887 "-- HikaShop version -- : 3.4.0 -- Joomla version -- : 3.8.7 -- PHP version -- : 7.1.14  I'm going to be starting a project soon which will require me to give Hikashop a new interface allowing registered users to submit a CSV string which will identify 1 to X items to be added to the User's shopping cart (similar in function to Hikashop's Bulk Product Input within the Administrator tools).  Adding a feature like this doesn't seem to be a normal in-Hikashop customization route, so I am guessing that I will need to physically add a new View and a new Controller. Submitting to a page without a Layout value gives me an Access error, and using a layout value overrides the submitted Task value. A little tinkering has shown me that a better understanding of Hikashop's custom Router may provide serious help on this project. Is there any formal documentation or guidance on the Router?  I have inserted a new View folder and templates, and can reach them through a custom browser address (&quot;?option=com&#95;hikashop&amp;view=bulk&quot;), but I haven't managed to create a suitable Menu Item Type option under Hikahsop's list yet.  In this new Controller (extending hikashopController), the standard Joomla method of submitting an action value with the format &quot;controller:taskname&quot; doesn't automatically trigger the class method &quot;taskname&quot;, so I am using an IF statement to trigger it, and plan to redirect the browser back to the same page after the submitted CSV text is parsed and items are added to the cart, with confirmation reported via Joomla Messages.  Any other suggestions or moving pieces I should be concerned about? Suggestions?")*

Thank you very much! That sounds precisely like what I will need.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg5NDU1MS1idWxrLWFkZC10by1jYXJ0P3RtcGw9bWFya2Rvd24=) 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.046 seconds

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