Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How do I add and extra step to the shopping cart process


Juzzyman

Recommended Posts

Hi everyone

 

I am trying to set up a stock footage site. I have used v2.3.1

 

I am trying to figure out a way to add a license fee to the images that the client buys. So for example they buy 5 pictures and add them to the shopping cart. They are then taken to another license page and based on a few variables a license fee is added to the shopping cart.

 

There will only really be 5 or 6 license fees to choose from, so there wont be a million variables.

 

I only want to add the fee to the purchase price and not to each picture they have bought. So it needs to take place during the checkout process.

 

How do I do this? I have been wondering if there is a module that does this or can the shipping be modified so that based on certain criteria a fee is added to the final amount.

 

REALLY appreciate your help with this!

Link to comment
Share on other sites

@@Juzzyman,

 

You could use the low order fee module to apply a once per order fee to all orders. Sort if like what you want. Just change the language definitions to call it a 'License fee'

 

 

 

 

Chris

Link to comment
Share on other sites

Hi Chris

 

Thanks for your reply.

 

Mulitmixer suggested the same thing and I installed the module that does that.

 

This does work but only adds one fee. How would I change it to add one of...say 4 different fees?

 

So if you click on A it adds $10 if you click on B it adds $20 etc

Link to comment
Share on other sites

You could amend the delivery options to display 4 different options and when they check out only charge for the one they select.

 

This woould apply for all purchases though.

 

Cheers

 

g

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Link to comment
Share on other sites

I think that my best option is to amend the shipping options.

 

My Plan is to duplicate the "flat rate" option a few times and then just change the wording and the flat rate fee. That should work

 

BUT...

 

How do I do this??? Firstly, how do I change the word "Flat Rate" to whatever I want it to be. It is in Admin somewhere

 

Secondly what do I duplicate in the code?

 

This is the code, I think from checkout_shipping.php

 

<?php

if ($free_shipping == true) {

?>

 

<tr>

<td><strong><?php echo FREE_SHIPPING_TITLE; ?></strong> <?php echo $quotes[$i]['icon']; ?></td>

</tr>

<tr id="defaultSelected" class="moduleRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, 0)">

<td style="padding-left: 15px;"><?php echo sprintf(FREE_SHIPPING_DESCRIPTION, $currencies->format(MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER)) . tep_draw_hidden_field('shipping', 'free_free'); ?></td>

</tr>

 

 

 

<?php

} else {

$radio_buttons = 0;

for ($i=0, $n=sizeof($quotes); $i<$n; $i++) {

?>

 

<tr>

<td colspan="3"><strong><?php echo $quotes[$i]['module']; ?></strong> <?php if (isset($quotes[$i]['icon']) && tep_not_null($quotes[$i]['icon'])) { echo $quotes[$i]['icon']; } ?></td>

</tr>

 

 

<?php

if (isset($quotes[$i]['error'])) {

?>

 

<tr>

<td colspan="3"><?php echo $quotes[$i]['error']; ?></td>

</tr>

 

<?php

} else {

for ($j=0, $n2=sizeof($quotes[$i]['methods']); $j<$n2; $j++) {

// set the radio button to be checked if it is the method chosen

$checked = (($quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id'] == $shipping['id']) ? true : false);

 

if ( ($checked == true) || ($n == 1 && $n2 == 1) ) {

echo ' <tr id="defaultSelected" class="moduleRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n";

} else {

echo ' <tr class="moduleRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n";

}

?>

 

<td width="75%" style="padding-left: 15px;"><?php echo $quotes[$i]['methods'][$j]['title']; ?></td>

 

<?php

if ( ($n > 1) || ($n2 > 1) ) {

?>

 

<td><?php echo $currencies->format(tep_add_tax($quotes[$i]['methods'][$j]['cost'], (isset($quotes[$i]['tax']) ? $quotes[$i]['tax'] : 0))); ?></td>

<td align="right"><?php echo tep_draw_radio_field('shipping', $quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id'], $checked); ?></td>

 

<?php

} else {

?>

 

<td align="right" colspan="2"><?php echo $currencies->format(tep_add_tax($quotes[$i]['methods'][$j]['cost'], (isset($quotes[$i]['tax']) ? $quotes[$i]['tax'] : 0))) . tep_draw_hidden_field('shipping', $quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id']); ?></td>

 

<?php

}

?>

 

</tr>

 

<?php

$radio_buttons++;

}

}

}

}

?>

 

</table>

</div>

 

<?php

}

?>

Link to comment
Share on other sites

every file have a coresponding language file..ie for includes/modules/shipping/flat.php that would be includes/languages/english/modules/shipping/flat.php

 

 

To make an "extra" flat rate module , make a copy of it, chnage the class names, the "language define" variables and then rename the copy to something else...(like flat2.php or whatever) Then you will also have to have a coresponding language file with the same name.

 

Thats it you can then install it via admin as any other shipping module.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...