Jump to content

Please Help


Lisafer

Recommended Posts

I'm VERY new to php and it's been a wild three weeks.

 

I'm moving my old Miva shopping cart to Opencart - I have it up and working. I still have a lot to learn but it seems to be functioning.

 

I'm having trouble with my htaccess redirect rules.

 

This is what I've got for now:

 

RewriteCond %{QUERY_STRING} ^Screen=PROD&Store_Code=SI&Product_Code(.*)$
RewriteRule ^(.*)$ http://www.domain.com/catalog/ [R=301,L]

RewriteCond %{QUERY_STRING} ^Screen=PROD&Product_Code=(.*)$
RewriteRule ^(.*)$ http://www.domain/catalog/ [R=301,L]

RewriteCond %{QUERY_STRING} ^Screen=CTGY&Category_Code=(.*)$
RewriteRule ^(.*)$ http://www.domain.com/catalog/ [R=301,L]

 

And that's redirecting to the front page of the shopping cart.

 

The "old" product code is now the "model number" in the new cart. I looked in the tpl files and it looks like I want to put the identifier? varible? of <?php echo $product['model']; ?> into the rewrite rule - this will redirect all 1100 products in the old cart into the correct page in my new cart. But I don't know how to turn <?php echo $product['name']; ?> into something that will work. I also used to have dynamic links and now have static.

 

I need a drink.

 

Please please help.

 

Please.

Link to comment
Share on other sites

You should look into a migration service to go from miva to opencart.

cart2cart

 

Not sure what are asking for in php, php isn't used in htaccess file, need to change some items in the script itself?

 

As for htaccess rules, you can return the values of the parameters back as a variable back something like this

RewriteRule /catalog/Screen/(.*)/Store_Code/(.*)/Product_Code/(.*) ?Screen=$1&Store_Code=$2&Product_Code=$3 [QSA]
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.