News:

Support the VirtueMart project and become a member

Main Menu

Order url of a product

Started by jordy123, November 06, 2015, 15:58:39 PM

Previous topic - Next topic

jordy123

I want to use a price table, which redirect to an order url of a product. But whats the order url of a product? i only know the standard url that redirect you to the product but not the order url (that puts the product in your cart)

Anyone that knows it?

GJC Web Design

its not a "url" .. it is an ajax call with parameters to a function

e.g. index.php?option=com_virtuemart&nosef=1&view=cart&task=addJS&format=json&lang=&Itemid=101 + parameters from the form

study how e.g. add to cart works from a cat page.. it is a series of forms

GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

jordy123


Milbo

Quote from: GJC Web Design on November 06, 2015, 16:08:36 PM
its not a "url" .. it is an ajax call with parameters to a function

e.g. index.php?option=com_virtuemart&nosef=1&view=cart&task=addJS&format=json&lang=&Itemid=101 + parameters from the form

Which is an URL, but you are right it is not a common URL and our code uses a form, but imho we use the request, so it should work with a pure url
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

jordy123

index.php?option=com_virtuemart&nosef=1&view=cart&task=addJS&format=json&lang=&Itemid=101 + parameters from the form

What are those parameters than?

GJC Web Design

e.g

Itemid   101
customProductData[71][15]   70
customProductData[71][16]   72

pid   71
pname   Classic Jacket
quantity[]    1

virtuemart_product_id[]    71

index.php?option=com_virtuemart&nosef=1&view=cart&task=add&lang=&customProductData%5B71%5D%5B16%5D=72&quantity%5B%5D=1&virtuemart_product_id%5B%5D=71&pname=Classic+Jacket&pid=71&Itemid=101

yes.. does work .. and returns to cart...  interesting :)
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Milbo

Yepp. that is on purpose, so that people can use it almost like an API.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

GJC Web Design

yes.. could be called from anywhere.. nice...
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

jordy123

What does this mean?

customProductData[71][15]   70
customProductData[71][16]   72

pid   71

How do you knows this data?

:)

GJC Web Design

hey come on .. be more proactive from your side.. 

Quotestudy how e.g. add to cart works from a cat page.. it is a series of forms

use firebug etc to study the calls
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

jordy123

I tested it out and works :)

Thank you very much <3