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

#   Adding variants causes 500 internal server error

##

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26400
- Thank you received: 4079
-
- [](http://obsi.dev)
-

13 years 10 months ago [\#84828](#84828) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Adding variants causes 500 internal server error](/forum/2-general-talk-about-hikashop/77073-adding-variants-causes-500-internal-server-error?start=20#84828 "Hi, when adding characteristics to a product I am running into a major problem.  I added my characteristics one by one and saved them after each addition.  After I added each characteristic I went to 'manage variants' and deleted the unnecessary ones.  I checked my front-end after each characteristic was added.  The first four characteristics worked with no problem, but the 5th caused the 500 error.  Numbers of variants are running into hundreds at this stage... could it be a question of php memory allocation? At one point I was receiving a fatal error saying exactly this, but it stopped after I attempted to delete and start over. Now I just get the 500 error constantly, but it works agin when I trash the 5th characteristic. Also thought it could be duplicate database entries, but I manually deleted everything I added for this item, and the problem still persists when I recreate the characteristics &amp; variants. Please help!")*

Hi,

From the documentation of [ ec.europa.eu/taxation\_customs/vies/checkVatService.wsdl](http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl)

> MS\_UNAVAILABLE: The Member State service is unavailable, try again later or with another Member State;

The thing which is strange is that the SoapClient is called into a try catch so, it should be catch by HikaShop and not trigger the PHP error message.

You could use this code for the helper vat Code:

function onlineCheck($vat){ //no online check for php4 if (extension_loaded('soap')) { try{ $client = new SoapClient("http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl"); $vat = strtoupper(str_replace(array(' ','.'),array('',''),$vat)); $result = $client-&gt;checkVat(array('countryCode' =&gt; substr($vat, 0, 2), 'vatNumber' =&gt; substr($vat, 2))); if(empty($result) &#124;&#124; !$result-&gt;valid) { $this-&gt;message = JText::_('VAT_NUMBER_NOT_VALID'); } }catch(SoapFault $e) { $this-&gt;message = $e-&gt;__toString(); $result = false; }catch (Exception $e) { $this-&gt;message = $e-&gt;__toString(); $result = false; } if ($result === false &#124;&#124; empty($result) &#124;&#124; !$result-&gt;valid ) { $app =&amp; JFactory::getApplication(); if($_REQUEST['tmpl']=='component'){ hikashop_display($this-&gt;message,'error'); }else{ $app-&gt;enqueueMessage($this-&gt;message); } return false; } }else{ $app =&amp; JFactory::getApplication(); $this-&gt;message = JText::_('SOAP_EXTENSION_NOT_FOUND'); if($_REQUEST['tmpl']=='component'){ hikashop_display($this-&gt;message,'error'); }else{ $app-&gt;enqueueMessage($this-&gt;message); } return false; } return true; }

But you got an error because the Member State service is unavailable, so that's not an bug in HikaShop.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

The following user(s) said Thank You: [jen168](/forum/user/8020-jen168 "View jen168's Profile")

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

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