Jump to content

need help with shop cart


darkfreaks

Recommended Posts

ok guys my shopping cart isnt linking right and im pretty sure its not my code but my clients tech support says it is so i need a second opinion. ok for my image link code i have something like

 

 

<?php

$cat_image= WEB_ROOT . "images/category" . $cat_image; // path to image
?>

 

which is the same as what they want the path to be

 /images/category/imagehere

 

so i am abit confused as why it isnt linking correctly when i view it i get a link like

mysite.com/hermes/59030939043/plaincart/category/image

 

i am pretty sure this is a server problem right ???

Link to comment
https://forums.phpfreaks.com/topic/124663-need-help-with-shop-cart/
Share on other sites

okay i found where they define webroot ill paste the code'

<?php

$thisFile = str_replace('\\', '/', __FILE__);
$docRoot = $_SERVER['DOCUMENT_ROOT'];

$webRoot  = str_replace(array($docRoot, 'library/config.php'), '', $thisFile);
$srvRoot  = str_replace('library/config.php', '', $thisFile);

define('WEB_ROOT', $webRoot);
define('SRV_ROOT', $srvRoot);
?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.