Cart Module shows no information

GK User
Mon Apr 18, 2016 1:27 pm
My top cart module shows up, but does not give me any information (as pictured) I was hoping for all the information as it appears in the demo, but all I get is the basket icon. When I add a product it does flash up 'LOADING' for a moment but nothing changes. I have checked all of the config settings as per the documentation and set Hikashop as directed, but I cannot get module working.

Shop is not available publicly yet as I am sorting WorldPay but I would like to get the cart module working, so I can supply login to see.

Am I missing something somewhere?

TIA, Laus.
User avatar
Senior Boarder

teitbite
Fri Apr 22, 2016 7:11 pm
Hi

I would need to see it first. Can You publish cart and tell me the url to Your site ?
User avatar
Moderator

GK User
Wed May 11, 2016 2:49 pm
Published link now, still in test mode: vx-3.com/teamshop/carmarthen-athletic/

Also messaged you log in, did you receive?
User avatar
Senior Boarder

teitbite
Wed May 11, 2016 8:47 pm
Hi

Ok. I see what is the problem. You are using this template on subelement and AJAX is set to look for cart information in Your frontpage, where there is no cart. Please edit file gk.scripts.js in storefront's /js folder.
Look for calling a function ajax() and add at the end of url this: "&Itemid=XXXX" where XXXX is an id to the main page of shop.
User avatar
Moderator

GK User
Thu May 12, 2016 2:12 pm
Do you mean add in onto here:
Code: Select all
if(!wait) {
               jQuery.ajax({
                   url: $GK_URL + 'index.php?tmpl=cart',
                   beforeSend: function() {
                       btn.addClass('loading');
                       wait = true;


or further down:
Sorry! :oops:
User avatar
Senior Boarder

GK User
Fri May 13, 2016 8:53 am
Using J3.5.1 Virtuemart 3.0.16
I have the same problem as you describe. If I mark Virtuemart frontpage menulink as homepage with the flag - then it is working but Virtuemart FrontPage is not our main FrontPage.
I tried to add the code "&Itemid=XXXX" to the .js file then it just says "loading" all time. Need more information - exactly where to add this code - you asked for to do that correct.
User avatar
Junior Boarder

GK User
Sat May 14, 2016 8:55 am
If this is not possible I could add the elements required to the homepage template which is Music State, could you advise the elements required to do this?
User avatar
Senior Boarder

teitbite
Sun May 15, 2016 12:09 pm
Hi

That's not so simple, there is a lot of code around multiple files involved, so moving ajax cart functionality from one template to another is beyond forum support, since it's simply too much work. But changing the link should should work. Please one of You send me an access to ftp so I'll try myself and will post what was wrong.
User avatar
Moderator

GK User
Sun May 15, 2016 10:00 pm
Hi teitbite
I managed to get the cart to work in position "sidebar" by renaming the override mod_virtuemart_cart in ../templates/gk_storefront/html/ - but I would much rather use the nice minicart i topmenu if possible.
I have send you a private message and attached the gk.scripts.js file from ../templates/gk_storefront/js/ (Storefront version 3.20.1) so if you could add the "&Itemid=XXXX" to url/urls that would be great.
For future update/upgrades it would be nice to know what and where you added - but i can always compare the files.
There should be a field in configuration to add the Fronpage id - just in case that your shop Frontpage is not the main one 8-)
User avatar
Junior Boarder

GK User
Sun May 15, 2016 10:27 pm
sorry... can't attach file in privat message - did not know that and .js file is not allowed here so I will just wait for your instructions..
User avatar
Junior Boarder

teitbite
Mon May 16, 2016 9:53 am
Hi

@Laus I got Your FTP, but I cannot find shop on Your site. Can You please tell me the url to it ?

@Stensbo please wait till I'll figure out how to make it, so I'll post a solution here.
User avatar
Moderator

teitbite
Mon May 16, 2016 9:57 am
Hi

@Laus nevermind, just found it :) Sending it to programmers. Will inform as soon as they will come up with an idea how to deal with it.
User avatar
Moderator

teitbite
Wed May 18, 2016 9:53 am
Hi

Got an answer from programmers. First of all please disable Admin Tools since it blocks AJAX.

Now copy files: ajax.php, json.php i cart.php from Your shop template to the one You are using as default on. Please let me know if this worked.
User avatar
Moderator

GK User
Wed May 18, 2016 4:07 pm
That seems to have worked, thank you for your perseverence.
User avatar
Senior Boarder

GK User
Wed May 18, 2016 7:02 pm
Thank you for the prompt answer, I'm coming from
https://www.gavick.com/forums/storebox- ... 86#p257786
I'm using storebox template, and added ajax.php and cart.php to my almost blank template on homepage.
I've found no json.php on it, so I copied from a storefront package, but the situation didn't change, could json.php be the culprit?
I refreshed and cleand Joomla cache, with no result...
User avatar
Senior Boarder

GK User
Wed May 18, 2016 9:06 pm
In my case cart is working perfect in topnav if I mark Virtuemart frontpage as homepage (but that is not our main one) - even with Admin Tools enabled.
With the below code added in gk.scripts.js - (where xxx is my menu item id for virtuemart frontpage)
Code: Select all
 url: $GK_URL + 'index.php?tmpl=cart&lang=' + jQuery('html').attr('lang').split('-')[0] + '&Itemid=xxx',

Admin Tools disbled, Virtuemart frontpage marked/not marked as homepage it does not work. For one secund cart comes up "loading"
I have only 1 template - Storefront - for the hole site so I suppose the ajax.php, json.php cart.php is where they should be.
User avatar
Junior Boarder

GK User
Fri May 20, 2016 1:05 pm
I'm not using VM frontpage and don't intend to, in any way I created a new menu and changed the itemid in this code
Code: Select all
jQuery.ajax({
                           url: $GK_URL + 'index.php?tmpl=cart&lang=' + jQuery('html').attr('lang').split('-')[0] + '&Itemid=566',
                           cache: false,
                           beforeSend: function() {
                                   btn.addClass('loading');
                                   wait = true;
                           },

It doesn't work, so I tried setting it on categories itemid, but nothing improved the current malfunction.
I am not using any strange extension, the only thing I am doing is using another template (a blank one, for an html5 content, so no strange scripts are involved) for the home.
Now I see on this thread
https://www.gavick.com/forums/storebox- ... open-46275
that someone solved with jquery easy plugin, but so far I've been unable to solve.
Please teitbite or someone, help us.
User avatar
Senior Boarder

teitbite
Sat May 21, 2016 1:22 pm
Hi

This is not a problem of jQuery, but the fact that cart informations are taken from frontpage, so if Storefront is not used for frontpage there is no informations cart can use. Try moving files ajax.php, json.php i cart.php from Storefront to the root folder of Your default template.
User avatar
Moderator

GK User
Sun May 22, 2016 10:25 am
Hi teitbite, I actually copied the three files you mention on the default template, which is the simplest template you can think of.
In need of a blank template for the animation you can see on the home page of http://bit.ly/1TOJ8Ym I used the blank template from www.blank.vc.
I consider it fit for the task, but I could also switch back to your storebox template if you tell me there's a way to display this code and only this on Joomla's home page
Code: Select all
<html>
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
   <meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
   <title>Liquorit.it</title>
<!--Adobe Edge Runtime-->
    <meta http-equiv="X-UA-Compatible" content="IE=Edge">
    <script type="text/javascript" charset="utf-8" src="anihome_edgePreload.js"></script>
    <style>
        .edgeLoad-EDGE-2318784 { visibility:hidden; }
    </style>
<!--Adobe Edge Runtime End-->

</head>
<body style="margin:0;padding:0;">
   <div id="Stage" class="EDGE-2318784">
   </div>
</body>
</html>

Thanks for your help
User avatar
Senior Boarder

teitbite
Tue May 24, 2016 10:24 am
Hi

This will not works. This template does not support a basic functionality and is not able to load sub templates like ?tmpl=cart. I honestly have no idea how to work this around, but You may be into something. All You need is:

Code: Select all
    <script type="text/javascript" charset="utf-8" src="anihome_edgePreload.js"></script>
    <style>
        .edgeLoad-EDGE-2318784 { visibility:hidden; }
    </style>
   <div id="Stage" class="EDGE-2318784"></div>


actually and rest can in fact be Storefront template. So You may include this code in Custom HTML module placed in "mainbody" module position for frontpage. Add some page class suffix and use css to hide all extra elements on it.
User avatar
Moderator

GK User
Tue May 24, 2016 12:24 pm
Teitbite, let me clarify please, I am using storebox as a main template, you mean I have to use another template (storefront as an example) and assign it to the home page removing or hiding code through css?
What if I duplicate my storebox template with another name and use it instead? Please tell me if you see pros and cons of these two solutions?
User avatar
Senior Boarder

teitbite
Thu May 26, 2016 10:09 am
Hi

I do not want to guess, please send me an access to ftp and joomla panel. I'll try to adjust the code to the situation You have now.
User avatar
Moderator

GK User
Thu May 26, 2016 12:34 pm
you've got a private message :-)
User avatar
Senior Boarder

teitbite
Thu May 26, 2016 7:34 pm
Hi

I think I've solved it. In short a solution is to upload files cart.php, ajax.php and json.php to Your default template. DO NOT USE + '&Itemid=566' in gk.scripts.js if mentioned files were uploaded.
User avatar
Moderator

teitbite
Thu May 26, 2016 7:34 pm
Och and cart mofule has to be configured to be used an ALL pages.
User avatar
Moderator

GK User
Thu May 26, 2016 8:41 pm
Hello,
My cart seems to work properly now :) after I asigned it to ALL pages. I uploaded QuickStart Storefront to a subdomain so I could compare config and settings. One difference was that Quickstarts cart was asigned to all pages and I had it only asigned to one.
User avatar
Junior Boarder

teitbite
Mon May 30, 2016 11:30 am
Hi

Great to hear it's working finally :) Happy I could help. Closing this thread than.
User avatar
Moderator


cron