Jump to content

Carriers not displaying


Recommended Posts

I´m testing my shop on 1.5.6 version (now running 1.4.7) and unfortunately I cant move forward because when I get one thing fixet another one arieses :/

 

I was trying to get the bankwire payment to work so I edited all my carriers and sat the checkboxes  on the group access to active ( they were not active after upgrading from the previous version).

I thought maybe my bankwire payment didn´t work because of that but after I updated then all of my carriers dissapeared in the checkout. 

 

I removed the checkboxes again on the group access for every carrier but no luck. The carriers won´t show up again in the checkout so I cant test the payment... or activate/upgrade my shop until then. Getting pretty tired  :huh:

 

So I have started to debug and I found out that count($carriers) in the order-carrier.tpl file returns 0, therefore it will display "There are no carriers available that deliver to this address"

 

So I check the sql in the getCarriers function in the carrier class (carrier.php) and tried to run the sql on my db and it returns the 2 carriers that are active. WTF!!

 

Please anyone, can you help me?

 

 

I´ve attached 3 screenshots (front with and without opc module activated and the db result) and here is the sql I copied from the getcarriers function

 


SELECT c.*, cl.delay

FROM `ps_carrier` c

LEFT JOIN `ps_carrier_lang` cl ON (c.`id_carrier` = cl.`id_carrier` AND cl.`id_lang` =6)

LEFT JOIN `ps_carrier_zone` cz ON (cz.`id_carrier` = c.`id_carrier`)

LEFT JOIN `ps_zone` z ON z.`id_zone` = 9

WHERE c.`deleted` = 0

AND c.`active` = 1

AND cz.`id_zone` = 9 AND z.`active` = 1 AND c.is_module = 0

AND c.id_carrier IN (SELECT id_carrier FROM ps_carrier_group WHERE id_group IN ('3'))

GROUP BY c.`id_carrier`

ORDER BY c.`position` ASC


 

 

 

I do have the onepagecheckout module and I have tried both to disable that and switch my theme to the default prestashop, but no luck.

 

I would like to point out that it happend immediately after I edited my carriers.

 

 

post-357258-0-16392100-1383770429_thumb.jpg

post-357258-0-89075300-1383770437_thumb.jpg

post-357258-0-00557600-1383771847_thumb.jpg

Edited by ragnabt (see edit history)
Link to comment
Share on other sites

FINALLY!!!!

 

I figured the reason but why it happens I dont know.

 

I looked into the carrier tables in the database and noticed that the original carriers (those which were marked as deleted after I edited them for the first time) were the only carriers assigned to a group id nr 1 whereas all the other carriers were assigned to group 2 and 3 .

 

So I deleted every record from the carrier tabels and createde new carriers in the presta admin. 

 

these where assigned to groups nr 2 and 3 and no nr 1, so I added nr 1 to the table and wupti, the carriers are back again. 

 

But what I cant figure out is where this group nr 1 is coming from. It´s not in my group table. 

 

So if I edit my carriers i must remember to add group nr 1 in the table carrier_group. 

 

Is this a bug in presta or is something just f**** up with my shop :)

 

And where is this group one defined?

 

I upgraded from 1.4.7 to 1.5.6

 

At least I can move on now :)

 

attached are some screenshots from my tables

post-357258-0-64493300-1384111614_thumb.jpg

post-357258-0-54976400-1384111617_thumb.jpg

Link to comment
Share on other sites

×
×
  • Create New...