• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: RSForm & Virtuemart Add to cart integration

RSForm & Virtuemart Add to cart integration 12 years 1 month ago #22306

Hi

hi

i try integrate VirtueMart 2 with rsform

i have VM2 text link to add product to cart like
index.php?addtocart=Add to Cart&quantity[]=1&pname=Chain Saw&option=com_virtuemart&view=cart&task=add&virtuemart_product_id[]=7&virtuemart_manufacturer_id=1&customPrice[0][9]=13&virtuemart_category_id[]=4

or form code
<form method="post"  action="index.php"><span class="addtocart-button"> 
	<input class="addtocart-button" title="Add to Cart" type="submit" name="addtocart" value="Add to Cart" /> </span>
	<input type="hidden" name="quantity[]" value="1" /> <input class="pname" type="hidden" value="Chain Saw" /> 
	<input type="hidden" name="option" value="com_virtuemart" /><input type="hidden" name="view" value="cart" />
	<input type="hidden" name="task" value="add" /><input type="hidden" name="virtuemart_product_id[]" value="7" /> 
	<input type="hidden" name="virtuemart_manufacturer_id" value="1" />
	<select id="customPrice09" name="customPrice[0][9]">
	<option value="13">30 No additional charge</option>
	<option value="14">40 +21,15 &euro;</option>
	<option value="15">50 +49,35 &euro;</option>
</select> 
	<input type="hidden" name="virtuemart_category_id[]" value="4" />
	</form>


can someone help me to create addtocart rsform using this code

You can add any parameter in the URL of a form. Parameters are added at the end of the URL. For example:
www.mywebsite.com/index.php?option=com_r...&myparameter=myvalue

In "Default Value" field of the form component you can add any PHP code you want. Just remember that the <code> tag is mandatory. Below you can find an example:

//<code>
$myparameter_value = JRequest::getVar('myparameter');
return $myparameter_value;
//</code>


Regards
The administrator has disabled public write access.

RSForm & Virtuemart Add to cart integration 12 years 1 month ago #22383

anyone ?
The administrator has disabled public write access.

RSForm & Virtuemart Add to cart integration 12 years 1 month ago #22384

Why Although Mappings powerful tool dont work with PHP Script called on form process ?

I create this code to create add to cart in virtuemart using rsform
$addtocart='Add to Cart';
$quantity='1';
$option='com_virtuemart';
$view='cart';
$task='add';
$virtuemart_product_id='7';
$virtuemart_manufacturer_id='1';
//$customPrice='14';
$customPrice= $_POST['form']['cena'][0]; 
$virtuemart_category_id='4';
$customPrice2='48';
if (isset($_POST['form']['dodaj']))
{
header('Location: http://domain/index.php?addtocart='.$addtocart.'&quantity[]='.$quantity.'&option='.$option.'&view='.$view.'&task='.$task.'&virtuemart_product_id[]='.$virtuemart_product_id.'.$virtuemart_manufacturer_id='.$virtuemart_manufacturer_id.'&customPrice[0][9]='.$customPrice.'&virtuemart_category_id[]='.$virtuemart_category_id.'&customPrice[1][21]='.$customPrice2.'');
exit();
}



but php script dont work with Mappings
UPDATE `jos_virtuemart_product_customfields` SET `custom_value` = '{nazwadomeny:value}' WHERE `virtuemart_customfield_id` = '48'


if i remove php script, mapping work fine :(
Last Edit: 12 years 1 month ago by jarecki74.
The administrator has disabled public write access.

RSForm & Virtuemart Add to cart integration 12 years 1 month ago #22404

  • octavian
  • octavian's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 783
  • Thank you received: 110
Because you are redirecting the form and nothing after that can be executed anymore.
Please note: my help is not official customer support. To receive your support, submit a ticket by clicking here
Regards,
RSJoomla! Development Team
Last Edit: 12 years 1 month ago by octavian.
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!