Mysql problem

  • Posts: 21
  • Thank you received: 0
13 years 8 months ago #9789

hi it's my first day with Hika, so far i like the concept...and the easy way to touch the design...and so on..and while i am playing with the problems to show the tax in the right way i get this from my DB
No valid database connection:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ORDER BY price_value DESC' at line 1 SQL=SELECT * FROM jos_hikashop_price WHERE price_currency_id IN (3) AND price_product_id IN () ORDER BY price_value DESC

huiiii...whats happen?

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 8 months ago #9804

Do you use the latest version of HikaShop ? I recall that there was such problem in a previous version so if you don't have the latest version I would recommend you to update.
If you have the latest version and still have the problem, could you do a screenshot of the full error page ?

Please Log in or Create an account to join the conversation.

  • Posts: 21
  • Thank you received: 0
13 years 8 months ago #9806

Hi, i did the download today...i guess it is the last version...

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 21
  • Thank you received: 0
13 years 8 months ago #9807

sorry, here is it in english

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 8 months ago #9809

In the file administrator/components/com_hikashop/classes/currency.php in the function getPrices, if you replace the line:
$filters[]= 'price_product_id IN ('.$ids_string.')';

by:
if(!empty($ids_string)){
$filters[]= 'price_product_id IN ('.$ids_string.')';
}

that should solve the problem.

Last edit: 13 years 8 months ago by nicolas.

Please Log in or Create an account to join the conversation.

  • Posts: 21
  • Thank you received: 0
13 years 8 months ago #9811

i did that:
function getPrices(&$element,&$ids,$currency_id,$main_currency,$zone_id,$discount_before_tax){
$currency_ids = array($currency_id=>$currency_id,$main_currency=>$main_currency);
$filters=array('price_currency_id IN ('.implode(',',$this->publishedCurrencies()).')');
if(!empty($ids)){
$ids_string = '';
foreach($ids as $id){
if(!empty($id)) $ids_string.= (int)$id.',';
}
$ids_string=rtrim($ids_string,',');
if(!empty($ids_string)){
$filters[]= 'price_product_id IN ('.$ids_string.')';
}


and the new error wondow shos up like that:


500 - No valid database connection:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') OR discount_product_id=0 ) AND discount_zone_id IN (0,4503) AND ( discount_fla' at line 1 SQL=SELECT * FROM jos_hikashop_discount WHERE discount_type='discount' AND discount_published=1 AND ( discount_quota>discount_used_times OR discount_quota=0 ) AND discount_start < 1299064287 AND ( discount_end > 1299064287 OR discount_end = 0 ) AND ( discount_product_id IN () OR discount_product_id=0 ) AND discount_zone_id IN (0,4503) AND ( discount_flat_amount!=0 OR discount_percent_amount!=0 )

You may not be able to visit this page because of:

1. an out-of-date bookmark/favourite
2. a search engine that has an out-of-date listing for this site
3. a mistyped address
4. you have no access to this page
5. The requested resource was not found.
6. An error has occurred while processing your request.

Please try one of the following pages:

* Home Page

If difficulties persist, please contact the System Administrator of this site.

No valid database connection:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') OR discount_product_id=0 ) AND discount_zone_id IN (0,4503) AND ( discount_fla' at line 1 SQL=SELECT * FROM jos_hikashop_discount WHERE discount_type='discount' AND discount_published=1 AND ( discount_quota>discount_used_times OR discount_quota=0 ) AND discount_start < 1299064287 AND ( discount_end > 1299064287 OR discount_end = 0 ) AND ( discount_product_id IN () OR discount_product_id=0 ) AND discount_zone_id IN (0,4503) AND ( discount_flat_amount!=0 OR discount_percent_amount!=0 )

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 8 months ago #9813

Ok, so instead of that modification, let's do this one:

change the line:
$filters[]= 'price_product_id IN ('.$ids_string.')';

to:

if(empty($ids_string)){
if(!empty($element->product_id)){
$ids_string = $element->product_id;
$ids = array($ids_string);
}else{
return false;
}
}
$filters[]= 'price_product_id IN ('.$ids_string.')';

in the same place.

Please Log in or Create an account to join the conversation.

  • Posts: 21
  • Thank you received: 0
13 years 8 months ago #9820

thank you very much!
kool - it works...i will go out the studio now...its late here (japan)..but tomorrow i will give you software more time...i am happy until here... i am working on two eng/jap onlinestores for the japanese market...and i did test a lot of joomla shops last week...it was very frustrating...nothing works realy... and if u need multilingual u r really f...t! so anyway i have one question, because i am thinking to buy HIKA...: will i be able to translate my content with the commercial version..like all the productnames and descriptions and so on?
thanks.a

Last edit: 13 years 8 months ago by gessner.

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 8 months ago #9825

If you have joomla 1.5, you will be able to do that with our integration with JoomFish (you can test it on our demo website). However, JoomFish is not yet ported to joomla 1.6 so it won't be possible if your website is on joomla 1.6

Please Log in or Create an account to join the conversation.

  • Posts: 21
  • Thank you received: 0
13 years 8 months ago #9826

wow kool...yeah and 1.6 needs to wait...there is no much stuff on the market at this time for 1.6..;-)
so i guess u do it with content element xml for joomfish...that's a smart step...i was also positive shocked about your japanese translation...and that i can touch every file with translation manager and do my own stuff....its great...
PS your demo site needs a little bit more love! ;-)
take care and thanks again! a.

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 8 months ago #9829

Yes, We'll have to look at the design of our demo website in the future :)

Please Log in or Create an account to join the conversation.

Time to create page: 0.069 seconds
Powered by Kunena Forum