OXID Community Forum

> International Forums > Developers > Basket item persistent parameters
Login
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Thread: Basket item persistent parameters


Reply
 
Thread Tools Search this Thread Display Modes
#Top   #1  
Old 05-26-2017, 11:55 AM
[email protected] m20@euroblaze.de is offline
Junior Member
Join Date: Apr 2017
Posts: 16
m20@euroblaze.de is on a distinguished road
Exclamation Basket item persistent parameters

Hello,

I am trying to add items to the basket. For that purpose, I am using the addToBasket function. But when I try to get the basket item persistent parameters or select list it returns null.

PHP Code:
foreach ($oBasket->getContents() as $oItem)
{
   
$oBasket->addToBasket($pProductId$dAmount,$oItem->getSelList() ,$oItem->getPersParams());

How can I get them?

Thank you.
Reply With Quote
#Top   #2  
Old 05-26-2017, 12:47 PM
foxido.de foxido.de is offline
Senior Member
Join Date: Jul 2013
Posts: 1,129
foxido.de is on a distinguished road
Default Re: Basket item persistent parameters

Code:
$session = oxRegistry::getSession();
$basket = $session->getBasket();
$oBasketItem = $basket->addToBasket($newproductid,$dAmount,$sellist,'');
$session->freeze();
__________________
Grüße

http://www.foxido.de/

- Modulentwicklung, Komplette Systeme, Beratung, Service

Tel: 02841-9161670

Deep-AutoSuggest, der neue Finder 4.6x 4.10.x und 90 weitere Module
Reply With Quote
#Top   #3  
Old 05-26-2017, 01:15 PM
[email protected] m20@euroblaze.de is offline
Junior Member
Join Date: Apr 2017
Posts: 16
m20@euroblaze.de is on a distinguished road
Default Re: Basket item persistent parameters

Actually what I need is to make a selection of the articles that are in basket already and send emails to the manufacturers after the order properly.
That's why I wanted to make a new basket and add all the products that are from that one manufacturer and send mail.
It is giving me an error that the price is null and it is not.
Reply With Quote
#Top   #4  
Old 05-26-2017, 01:57 PM
[email protected] m20@euroblaze.de is offline
Junior Member
Join Date: Apr 2017
Posts: 16
m20@euroblaze.de is on a distinguished road
Default Re: Basket item persistent parameters

I am getting this:

Call to a member function getPrice() on null..
Reply With Quote
#Top   #5  
Old 05-26-2017, 02:41 PM
vanilla thunder's Avatar
vanilla thunder vanilla thunder is online now
Marco's Sidekick
Join Date: Nov 2010
Posts: 6,358
vanilla thunder is on a distinguished road
Default Re: Basket item persistent parameters

why exactly do you need a basket object? After the order is placed, iterate over all bought products, sort them by manufacturer and send emails.
Reply With Quote
#Top   #6  
Old 05-26-2017, 02:46 PM
rubbercut rubbercut is offline
Senior Member
Join Date: Nov 2009
Posts: 1,321
rubbercut is on a distinguished road
Default Re: Basket item persistent parameters

http://forum.oxid-esales.com/showthr...252#post177955

http://forum.oxid-esales.com/showthr...731#post185604

How do you call "getprice"?
__________________
Grüße

rubbercut
Reply With Quote
#Top   #7  
Old 05-30-2017, 07:00 AM
[email protected] m20@euroblaze.de is offline
Junior Member
Join Date: Apr 2017
Posts: 16
m20@euroblaze.de is on a distinguished road
Default Re: Basket item persistent parameters

I was heading in the wrong direction. Don't know why I needed that.

But this helped me.
Thank you Vanilla Thunder.
Reply With Quote
Reply

Bookmarks

Tags
basket, item, parameters, persistent

« Previous Thread | Next Thread »
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Nicht Sichtbar
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Error when after adding item to the basket ivo.kuzov Developers 4 07-06-2016 11:45 AM
How do detect when if new item was added to the basket? filip.filipovic Developers 1 06-14-2014 11:09 AM
Funktion für Warenkorb: Ist Basket-Item in bestimmter Kategorie? floko Entwickler 0 10-25-2012 10:44 AM
Changes via ERP SOAP are not persistent kgc Developers 5 06-01-2012 04:01 PM
Manuelle Rabattänderung ist nicht persistent billpay Entwickler 2 10-04-2010 08:45 AM

All times are GMT +1. The time now is 02:33 PM.