obanana_b2b_test/selected_variation.php

14 lines
403 B
PHP

<?php
// update_selected_variation.php
// Retrieve the JSON data sent via AJAX
$data = json_decode(file_get_contents('php://input'), true);
// You can process the $data as needed, for example, store it in session
session_start();
$_SESSION['selected_variation'] = $data;
var_dump($_SESSION['selected_variation']);
// You can also return a response if needed
// echo json_encode(['success' => true]);