I am using Ubercart 3 (with drupal 7) and trying to make the php enter the "nid" (node id), "oid" (attribute id) & "option" (option id), so i can add them to a custom ADD TO CART url.

This is the format it needs:
"cart/add/p[nid]_q1_a[oid]o[option]-i?destination=cart"

How do i get the node id, attribute id & option id from this row in my view to add to cart?

Views does have a "product" section to add to cart, however, I am using the "field collection view" module and it does not have a way to add a product "add to cart" link so i must make it myself via php using this views php module, but i do not know php.

How do i make this link in php so it supports each row?
Add to cart

Please help.

Thank you.

Comments

fizk’s picture

Issue summary: View changes

Hi jsi, is this still an issue?

fizk’s picture

Status: Active » Closed (fixed)