| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Global Variable | ||||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() Hi, Everyone
I need to create the Global Variable to access in all over the xcart pages. This values can be control from Admin side, because the values can be changed dynamically by administrator. Please suggest how to implement this. Thanks
__________________
X-Cart/LiteCommerce version v4.4.1 |
|||||||
#2
|
|||||||||
|
|||||||||
![]() You can add a new option to the "xcart_config" table.
It will automatically appear in the X-Cart admin backend and will be available in both PHP code and templates (e.g. $config['General']['your_option_name'] & {$config.General.your_option}). Check the "<xcart_dir>/sql/xcart_data.sql" file for sample INSERT SQL commands.
__________________
Alex Solovev, Qualiteam --- User manual Video tutorials X-Cart FAQ You are welcome to press "Thanks" button if you find this post useful ![]() Click here to learn how to apply patches X-Cart Extensions |
|||||||||
|
#3
|
|||||||
|
|||||||
![]() Alex,
My customer asked me to add common extra amount to all products. So i asked this global variable. I have added this extra values to the product which are displaying. But i have getting problem with mini cart and cart page. I cannot able to identify where i need to add this common values to calculate the price. can u please suggest me how to get this calculated values from beginning to end. Thanks
__________________
X-Cart/LiteCommerce version v4.4.1 |
|||||||
#4
|
|||||||
|
|||||||
![]() Hi,
Anyhelp? The xcart is for a jewelery shop. The client will be changing the products' price according to silver's market price. The price will be updated twice a day. So he needs to input the market price & makeover charges in one place at admin and the prices should change accordingly. Can somebody help with this? we need to finish this fast. Very urgent. Any help would be appreciated and Thanks in advance.
__________________
X-Cart/LiteCommerce version v4.4.1 |
|||||||
#5
|
|||||||
|
|||||||
![]() It sounds like you might be better off setting this up as a tax with the tax set to be displayed in the product price. See the manual on setting up taxes.
__________________
Manuka Bay Company X-Cart Version 4.0.19 [Linux] UGG Boots and other fine sheepskin products http://www.snowriver.com |
|||||||
|
#6
|
|||||||
|
|||||||
![]() Quote:
Hi, We followed your idea. Currently its working fine. But a problem occurs on mini cart and cart pages. The values added are not multiplied with no. of products added to cart. Can u shed some light on that? It would be great if u point us where the calculation(taxed price X quantity) is made. Thanks in advance.
__________________
X-Cart/LiteCommerce version v4.4.1 |
|||||||
#7
|
|||||||
|
|||||||
![]() I don't run 4.4.1 so I can't test it on my setup but I did try it out on the X-Cart demo site and taxes are properly multiplied by the number of items and show properly in the extended product price mini-cart and cart pages (e.g. quantity of 3 shows 3 times the tax added into the total product price). Note that you must have "Presume that a not logged in customer is from the default country" checked in your general settings for the tax to show before someone logs in.
__________________
Manuka Bay Company X-Cart Version 4.0.19 [Linux] UGG Boots and other fine sheepskin products http://www.snowriver.com |
|||||||
|
#8
|
|||||||||
|
|||||||||
![]() You should alter the "include/func/func.cart.php" script -> function "func_calculate".
__________________
Alex Solovev, Qualiteam --- User manual Video tutorials X-Cart FAQ You are welcome to press "Thanks" button if you find this post useful ![]() Click here to learn how to apply patches X-Cart Extensions |
|||||||||
|
#9
|
|||||||
|
|||||||
![]() Quote:
__________________
X-Cart/LiteCommerce version v4.4.1 |
|||||||
#10
|
|||||||
|
|||||||
![]() Quote:
__________________
X-Cart/LiteCommerce version v4.4.1 |
|||||||
|
|||
X-Cart forums © 2001-2020
|