- Posts: 5
- Thank you received: 0
Virtuemart - add to cart not working
-
Roke
Inactive member -
- New Member
-
Less
More
13 years 4 months ago #13125
by Roke
Replied by Roke on topic Re: Virtuemart - add to cart not working
I have the same problem.
sungaistyle.com doesn't add products
while
www.sungaistyle.com does.
Is there a solution?
Cheers
Roger
sungaistyle.com doesn't add products
while
www.sungaistyle.com does.
Is there a solution?
Cheers
Roger
Please Log in to join the conversation.
-
ivan.milic
Support Staff -
- Moderator
-
Less
More
- Posts: 14116
- Thank you received: 1639
13 years 4 months ago #13135
by ivan.milic
Replied by ivan.milic on topic Re: Virtuemart - add to cart not working
Try this,
open components\com_virtuemart\themes\hot_furniture\theme.js
find this:
Notice the line: new Ajax(formCartAdd.action, opt).request();
replace that line with all of this :
open components\com_virtuemart\themes\hot_furniture\theme.js
find this:
Code:
function handleAddToCart( formId, parameters ) {
formCartAdd = document.getElementById( formId );
var callback = function(responseText) {
updateMiniCarts();
// close an existing mooPrompt box first, before attempting to create a new one (thanks wellsie!)
if (document.boxB) {
document.boxB.close();
clearTimeout(timeoutID);
}
document.boxB = new MooPrompt(notice_lbl, responseText, {
buttons: 2,
width:400,
height:150,
overlay: false,
button1: ok_lbl,
button2: cart_title,
onButton2: handleGoToCart
});
setTimeout( 'document.boxB.close()', 3000 );
}
var opt = {
// Use POST
method: 'post',
// Send this lovely data
data: $(formId),
// Handle successful response
onComplete: callback,
evalScripts: true
}
new Ajax(formCartAdd.action, opt).request();
}
Notice the line: new Ajax(formCartAdd.action, opt).request();
replace that line with all of this :
Code:
var hjt_action = '';
if(window.location.href.toLowerCase().indexOf('www.') >= 0){
hjt_action = 'http://www.sungaistyle.com/index.php';
}else{
hjt_action = 'http://sungaistyle.com/index.php';
}
new Ajax(hjt_action, opt).request();
Please Log in to join the conversation.
Time to create page: 0.074 seconds