Skip to content
Advertisement

value from database not appearing into php

i have created a cart website using sql, html and php. the cart button is as below:

this is how my cart looks like:

the library.php file is as follows:

the thing is when i am adding items to the cart, i am able to display title and cart . but i am not able to display the price, whose field name is offer_price_corporate_artist in my database. can anyone tell me what i am missing.

Advertisement

Answer

Your Model for Shoppping Cart puts the offer_price_corporate_artist column into the returned arrays as a renames occurance called price

So in the other script replace

with

Small Warning

Unfortunately the getProducts() method does not rename the column as price so you have a bit of an anomily that is going to cause you a problem somewhere

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement