Kryptronic Software Support Forum

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.

#1 12-07-2009 15:24:12

proofing
Member
Registered: 02-10-2009
Posts: 38

Custom Sale Method

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

 

#2 12-07-2009 15:31:46

dh783
Member
From: Avondale, Arizona
Registered: 04-06-2005
Posts: 6233
Website

Re: Custom Sale Method

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

 

#3 12-07-2009 17:06:19

proofing
Member
Registered: 02-10-2009
Posts: 38

Re: Custom Sale Method

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

 

#4 12-07-2009 17:40:26

dh783
Member
From: Avondale, Arizona
Registered: 04-06-2005
Posts: 6233
Website

Re: Custom Sale Method

I am sorry, I was wrong, I must have been thinking of custom shipping but I could have sworn that I had seen a field for custom sale methods in the product information.

John

Offline

 

#5 12-08-2009 09:35:02

proofing
Member
Registered: 02-10-2009
Posts: 38

Re: Custom Sale Method

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

 

#6 12-08-2009 11:11:21

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19965
Website

Re: Custom Sale Method

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.

?>

Nick Hendler

Offline

 

#7 12-08-2009 14:30:23

proofing
Member
Registered: 02-10-2009
Posts: 38

Re: Custom Sale Method

Thank you.

Offline

 

#8 06-11-2010 06:47:54

amdowney
Member
From: UK-Warwickshire
Registered: 09-21-2007
Posts: 507
Website

Re: Custom Sale Method

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

 

Board footer