You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.
Hi,
Is it possible to use "Custom Sale Method" so it only applies to an individual product rather than all products?
Any help greatly appreciated as always.
Offline
A custom sale method will only affect the product that is assigned to use it, this is done in the admin product edit pages, so in general you could have hundreds of custom sales methods.
John
Offline
Sorry, I don't know what you mean?
Can you give me more details as I am unable to find 'admin product edit pages'
Thanks.
Offline
Does anyone have the answer to this question?
If it was only one item then I would just use the volume discount option, but unfortunately it is an item with about 30 options.
All help appreciated.
Thanks.
Offline
Sure. I'd edit the user defined custom sale as follows:
<?php
$cartids = $this->globals('ecom.checkout_cartids');
$cosess = $this->globals('ecom.checkout_cosess');
$found = 0;
foreach ($cartids as $randid => $item) {
if ($item['id'] == 'XXX') {$found++;}
} // End of foreach statement.
if(!(empty($found))) {
$sale_amount = 10;
$sale_textshow = 'Product XXX Discount Sale';
$this->globals('ecom.total_customsale',$sale_amount);
$this->globals('ecom.customsale_text',$sale_textshow);
} // End of if statement.
?>Offline
webmaster wrote:
Sure. I'd edit the user defined custom sale as follows:
Code:
<?php $cartids = $this->globals('ecom.checkout_cartids'); $cosess = $this->globals('ecom.checkout_cosess'); $found = 0; foreach ($cartids as $randid => $item) { if ($item['id'] == 'XXX') {$found++;} } // End of foreach statement. if(!(empty($found))) { $sale_amount = 10; $sale_textshow = 'Product XXX Discount Sale'; $this->globals('ecom.total_customsale',$sale_amount); $this->globals('ecom.customsale_text',$sale_textshow); } // End of if statement. ?>
An old post but I am looking to use the above code for particular product option selection items. Is the $item['id'] for the main product? What will the option selection item be?
Offline