Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Adding dynamic User-Inputs to the shopping cart


Geddo

Recommended Posts

Hi everyone. First post and guess what - a question :D

 

First i wanna say that i really like the OSCoomerce Shop cauze of open source and well written code. But now a problem which i can't solve. Maybe you can.

 

So i created a dynamic textbox in the product_info where the user can input some notes and ordering whishes for the product. Now i wanna take over this input-data to the shopping_cart and some other pages to display it again.

 

But that doesn't work for me. How can I put this input-data over to the shoping_cart? I tried this in the application_top:

 

 $products = $cart->get_products();
       $product_id = tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id']);
       for ($i=0, $n=sizeof($products); $i<$n; $i++) {
       if ($products[$i]['id'] == $product_id) {
      	 $cart->contens[$products[$i]['testvar'] = 10];
      	 
       }
}

 

So I tried " echo $cart->contens[$products[$i]['testvar']" later in the shopping_cart but I faild :(

 

Can someone help me? THANXX!!!!

Link to comment
Share on other sites

Check the Contributions section (link at top of forum pages) for the Option Type Feature contribution. It allows you to create input areas for customers. I use it on my site for personalized CDs - text boxes to input child's name, salutation and message, and a radio button to specify child's gender.

 

HTH,

 

Terry

Terry Kluytmans

 

Contribs Installed: Purchase Without Account (PWA); Big Images, Product Availability, Description in Product Listing, Graphical Infobox, Header Tags Controller, Login Box, Option Type Feature, plus many layout changes & other mods of my own, like:

 

Add order total to checkout_shipment

Add order total to checkout_payment

Add radio buttons at checkout_shipping (for backorder options, etc.)

Duplicate Table Rate Shipping Module

Better Product Review Flow

 

* If at first you don't succeed, find out if there's a prize for the loser. *

Link to comment
Share on other sites

Check the Contributions section (link at top of forum pages) for the Option Type Feature contribution. It allows you to create input areas for customers. I use it on my site for personalized CDs - text boxes to input child's name, salutation and message, and a radio button to specify child's gender.

 

HTH,

 

Terry

 

Thank you very much, i gonna try this

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...