Hi All
I have an open source javascript price calculator component installed on a site I am creating which provides pricing for image licences based on a complex matrix of costs.
It has it's own Add to Cart button which I would like to use to pass the order data to the Joomshopping Cart for the transaction to be completed and passed to PayPal.
In other words, I want to use the price calculator to create a custom price and product description which then ends up in the Joomshopping Cart for the order to be completed as per normal.
My idea is to pass the contents of the "ppksResultSummary" div and the "ppksResultTotal" div to the Joomshopping Cart when the "ppksAddToCartBtn" button is clicked. (It is not intended that the Joomshopping Add to Cart button be used in this instance, although I am open to suggestions)
The final segment of the price calculator html file is shown here-
<div id="ppksResult">
<div id="ppksResultSummary">PLUS Packs</div>
<!-- Content of div above is replaced dynamically with license summary -->
<div id="ppksReview"><a href="#" onClick="PLUSPACKSCALC.reviewUsage();return false;">(review usage)</a></div>
<div id="ppksResultDescription">licensing system</div>
<!-- Content of div above is replaced dynamically with license details -->
<div id="ppksAddToCartBtn" class="menuItem click" onClick="PLUSPACKSCALC.addToCart()">Add to cart</div>
<div id="ppksResultTotal">$</div>
<!-- Content of div above is replaced dynamically with total price -->
</div>
</div>
<!-- END SAA PLUS PACKS CALCULATOR -->
The final segment of the pricecalc.js file is shown here-
break;
case "ppksCovPriceWorld":
this.toggleSelection(this.menuItems.covPrice,_2a);
this.quote.coverage="Worldwide Coverage";
this.calc.coverage="world";
this.showResult();
break;
default:
alert("Program error: unidentified menu selection ("+_2a+")");
break;
}
}
},addToCart:function(){
},reviewUsage:function(){
this.showMenuHeader("ppksMenuInitial");
document.getElementById("ppksResult").style.display="none";
document.getElementById("ppksMenus").style.display="block";
},0:0};
Javascript/PHP is not my strong point and having looked at some Joomshopping controller files I cannot see how to make this happen.
If anyone can point me in the right direction it would be greatly appreciated. Or would this be best passed to an experienced developer?
Thanks in advance
Joomla: Joomla 1.7
JoomShopping: 3.2.7
JoomShopping: 3.2.7