Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Download Count Problem


lingopal

Recommended Posts

Posted

Our store offfers downloadable software.

 

When a customer purchases a product they recieve one download count and a 7 day expiry.

 

However when a customer purchases multiple quantites of the same product they still only recieve the one download count instead of "quantity x download count" opportunities I would expect them to recieve.

 

How do I go about coding this, i'm fairly inexperienced with php. Any help is greatly appreciated.

 

 

Thanks

Lingopal

Posted
Our store offfers downloadable software.

 

When a customer purchases a product they recieve one download count and a 7 day expiry.

 

However when a customer purchases multiple quantites of the same product they still only recieve the one download count instead of "quantity x download count" opportunities I would expect them to recieve.

 

How do I go about coding this, i'm fairly inexperienced with php. Any help is greatly appreciated.

Thanks

Lingopal

 

This is my attempt at it - can anyone forsee any problems with doing this?

 

in checkout_process.php, ln 203-209: orginally:

 

if ((DOWNLOAD_ENABLED == 'true') && isset($attributes_values['products_attributes_filename']) && tep_not_null($attributes_values['products_attributes_filename'])) {

 

$sql_data_array = array('orders_id' => $insert_id,

'orders_products_id' => $order_products_id,

'orders_products_filename' => $attributes_values['products_attributes_filename'],

'download_maxdays' => $attributes_values['products_attributes_maxdays'],

'download_count' => ($attributes_values['products_attributes_maxcount'] );

tep_db_perform(TABLE_ORDERS_PRODUCTS_DOWNLOAD, $sql_data_array);

 

 

 

which was changed to:

 

 

if ((DOWNLOAD_ENABLED == 'true') && isset($attributes_values['products_attributes_filename']) && tep_not_null($attributes_values['products_attributes_filename'])) {

 

$sql_data_array = array('orders_id' => $insert_id,

'orders_products_id' => $order_products_id,

'orders_products_filename' => $attributes_values['products_attributes_filename'],

'download_maxdays' => $attributes_values['products_attributes_maxdays'],

'download_count' => ($attributes_values['products_attributes_maxcount'] * $order->products[$i]['qty'])); // -- ?? Download count * quanity purchased?

tep_db_perform(TABLE_ORDERS_PRODUCTS_DOWNLOAD, $sql_data_array);

 

 

 

thoughts?

Archived

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

×
×
  • Create New...