Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

What Function Sends Data To The Cart Content Block And The Products In Cart Block? Rate Topic   - - - - -

 
  • bebopboy
  • Advanced Member
  • Trial users
  • Join Date: 04-Feb 20
  • 72 posts

Posted 02 June 2020 - 09:49 AM #1

In the same way that the Featured Items, New Items, Items on Sale, etc. blocks (and even the product pages, and micro stores) use the function fn_get_products() in fn.catalog.php is there a function in fn.cart.php that sends data to the Cart Content and Products in Cart blocks?

 

I want to insert a key and value into the $cart_products array that I'll use whenever the products are shown in these blocks. I thought the function would be fn_get_cart_products() but when I did some tests, I don't think they use that function. Could it be fn_calculate_cart_content()? 

 

Editing fn_gather_additional_products_data in fn.catalog.php seems to have an effect but only in the dispatch checkout.cart, I'm not sure if it affects any of the blocks I actually need it in.

 

Any ideas?

 

Thanks.



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 20675 posts

Posted 02 June 2020 - 01:52 PM #2

If you mean mini cart block. the data is taken from session


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)

 
  • bebopboy
  • Advanced Member
  • Trial users
  • Join Date: 04-Feb 20
  • 72 posts

Posted 03 June 2020 - 02:44 AM #3

Yup, that was what I was looking for, thanks! 

Quick follow up question, what's the function that actually adds a product into your cart and session when you press the 'Add to Caart' button then?



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 20675 posts

Posted 03 June 2020 - 05:33 AM #4

Yup, that was what I was looking for, thanks! 

Quick follow up question, what's the function that actually adds a product into your cart and session when you press the 'Add to Caart' button then?

 

Check fn_add_product_to_cart (app/functions/fn.cart.php)


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)

 
  • bebopboy
  • Advanced Member
  • Trial users
  • Join Date: 04-Feb 20
  • 72 posts

Posted 03 June 2020 - 06:52 AM #5

That was it, thanks a bunch!



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 20675 posts

Posted 03 June 2020 - 01:17 PM #6

You are welcome!


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)